Namespace sap.ui.core.AppCacheBusterModule: sap/ui/core/AppCacheBuster


The AppCacheBuster is used to hook into URL relevant functions in jQuery and SAPUI5 and rewrite the URLs with a timestamp segment. The timestamp information is fetched from the server and used later on for the URL rewriting.

Method Summary
sap.ui.core.AppCacheBuster.convertURL(sUrl)Converts the given URL if it matches a URL in the cachebuster index.
sap.ui.core.AppCacheBuster.handleURL(sUrl)Callback function which can be overwritten to programmatically decide whether to rewrite the given URL or not.
sap.ui.core.AppCacheBuster.normalizeURL(sUrl)Normalizes the given URL and make it absolute.
sap.ui.core.AppCacheBuster.register(base)Registers an application.
Method Detail
sap.ui.core.AppCacheBuster.convertURL(sUrl): string
Converts the given URL if it matches a URL in the cachebuster index. If not then the same URL will be returned. To prevent URLs from being modified by the application cachebuster you can implement the function sap.ui.core.AppCacheBuster.handleURL.
Parameters:
{string}sUrl any URL
Returns:
{string} modified URL when matching the index or unmodified when not
sap.ui.core.AppCacheBuster.handleURL(sUrl): boolean
Callback function which can be overwritten to programmatically decide whether to rewrite the given URL or not.
Parameters:
{string}sUrl any URL
Returns:
{boolean}true to rewrite or false to ignore
sap.ui.core.AppCacheBuster.normalizeURL(sUrl): string
Normalizes the given URL and make it absolute.
Parameters:
{string}sUrl any URL
Returns:
{string} normalized URL
sap.ui.core.AppCacheBuster.register(base)
Registers an application. Loads the cachebuster index file from this locations. All registered files will be considered by the cachebuster and the URLs will be prefixed with the timestamp of the index file.
Parameters:
{string}base URL of an application providing a cachebuster index file