You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead, I'm adding the script tag at the top, which works, but of course requires an internet connection. How would I add this as a pre-cached URL and CacheOnly, so it would work with offline?
Something like as follows should work (not tested)
pwa:
serviceworker:
enabled: truesrc: "sw.js"workbox:
resource_caches:
- match_callback: 'origin: cdn.jsdelivr.net'strategy: 'CacheFirst'preload_urls: # Optional, but you are now sure the library is preloaded even if used on another page the user never met before
- 'https://cdn.jsdelivr.net/npm/onsenui@2.12.8/js/onsenui.min.js'
I'm revisiting this, because last night the jsdelivr cdn was down for several hours because the certificate had expired. LOTS of sites broke, and I was reminded that at least for existing users (not new visitors) if I had this implemented it would have continued to work for a bit.
It does not appear that this is working, though, as the other assets show that they are delivered via the service worker, but not the jsdelivr ones.
- match_callback: 'origin: cdn.jsdelivr.net'strategy: 'CacheFirst'preload_urls: # Optional, but you are now sure the library is preloaded even if used on another page the user never met before
- 'https://cdn.jsdelivr.net/npm/onsenui@2.12.8/js/onsenui.min.js'
- 'https://cdn.jsdelivr.net/npm/onsenui@2.12.8/css/ionicons/css/ionicons.min.css'
- 'https://cdn.jsdelivr.net/npm/onsenui@2.12.8/css/onsen-css-components.min.css'
Description
I found a good javascript library for making mobile apps, onsenui, but I can't get it to work with AssetMapper
symfony/symfony#54342
Instead, I'm adding the script tag at the top, which works, but of course requires an internet connection. How would I add this as a pre-cached URL and CacheOnly, so it would work with offline?
In particular
on https://pwa.spomky-labs.com/the-service-worker/workbox/warm-caching
The text was updated successfully, but these errors were encountered: