Well, I know there are articles all over the internet that talk about service workers. However, I'm stuck.
I'm trying cache a few files for offlin...
For further actions, you may consider blocking this person and/or reporting abuse
assets/cricket.png
doesn't seem to valid since I'm getting a 404 on hitting car-cricket.glitch.me/assets/crick....It's good to catch these kinds of errors too:
Also,
addAll
won't cache any of the specified assets if even one request fails.Ah, thanks. That's fixed the error, but I still can't access the site offline. On mobile, it just shows the "no internet" page, and on computer I either get no errors or I get
An unknown error occurred when fetching the script.
Failed to load resource: net::ERR_INTERNET_DISCONNECTED
See if this helps.
There’s just no car-cricket.glitch.me/assets/crick... (look in car-cricket.glitch.me/assets), that’s why the Service Worker can’t cache it.
However, this file URL is cdn.glitch.com/6cc9893d-2247-43b3-..., so even with the fixed URL, it won’t be cached because Service Worker can’t cache external resources, if I’m correct.