Used for managing the browser cache of loading external elements can easily load version manifest and apply it to the media loader supports cache busting all media load requests uses the query string to bust browser versions.
_applyBasePath
url
Applies a base path to a relative url. This is not used in the filtering system because PreloadJS has its own method of prepending the base path that we use. Instead, it is used with an extra parameter to prepare().
url
String
The url to prepend the base path to.
The modified url.
_applyGlobalVersion
url
Applies cache busting or a global version to a url.
url
String
The url to apply versioning to.
The modified url.
_applySpecificVersion
url
Applies a url specific version to a url from the versions file.
url
String
The url to apply versioning to.
The modified url.
addVersionsFile
url
callback
baseUrl
Adds a versions text file containing versions for different assets.
prepare
url
[applyBasePath=false]
Prepare a URL with the necessary cache busting and/or versioning as well as the base directory.
The final url with version/cache and basePath added
registerURLFilter
filter
Adds a function for running all urls through, to modify them if needed. Functions used should accept one string parameter (the url), and return the modified url.
filter
Function
The function that will handle urls.
unregisterURLFilter
filter
Removes a function from the list of filtering functions.
filter
Function
The function to remove.