Input parameters
Event
prefetch-service-worker.js
This file is required to be in the root folder as service worker will only catch requests from clients under the service worker's scope. Please save it from the Prefetch module and import it your module and remember to set it to deploy to target directory.
Sample of application manifest $OS_<ModuleName>&ApplicationInfo
{
"manifest": {
"versionToken": "CbLdPJ6IyUH9DWWHHDZJuA",
"versionSequence": 275,
"urlVersions": {
"/PrefetcherDemo/_error.html": "?GpQQLI4fy6qLI4rBpQFPOQ",
"/PrefetcherDemo/css/_Basic.css": "?EqGzAe81QbZLXJyfY3oLwA",
"/PrefetcherDemo/css/Banking_Th.BankingTheme.css": "?FkZ4X17MAQOW6fHdGGU39A",
...
},
"urlMappings": {
"/PrefetcherDemo": "/PrefetcherDemo/index.html?PZxZm6d1nwD11trJvzCmrA",
}
Loading assets from disk cache is a good sign that the Prefetcher component works
Please see the demo for example. Thank you.