Service worker fails chrome audit when run off start_url
-
First, wanted to say I really love this plugin, it’s helped my site’s speed immensely and is almost the only serviceworker plugin that even exists.
Now, I managed to load the abtfpwa.js serviceworker along with OneSignal’s push notifications serviceworker and got them running alongside each other. But I have one last issue with abtf’s service worker: Chrome’s Lighthouse audit tool suggests that the start_url isn’t cached, even though I explicitly cache it in the Cache Preload section on the PWA tab of Above The Fold’s settings.
At first I thought it was just a false positive, since if I test offline caching manually it DOES work. However, when I install the site as an app on my android, it regularly fails to load if I’m not connected online saying “this app needs to be online for the first run”, even when it’s been run several times before. I never got that message using the (now abandoned) Offline Content serviceworker plugin from Mozilla.
The curious thing is if I run the audit from the start URL (https://sirtaptap.com/guides-index), the audit passes. If I run it from the homepage or any other page, it fails. If I change the start url to / then it passes on the homepage, fails everywhere else, etc.
I feel like I must have messed up a configuration somehow, but is it known what could cause this situation? My scope in my manifest seems to be set correctly, and like I said if I test chrome offline after letting the serviceworker preload, my start_url actually is preloaded. Can’t tell what the deal is
The page I need help with: [log in to see the link]
- The topic ‘Service worker fails chrome audit when run off start_url’ is closed to new replies.