Asked By: Anonymous
I am trying to follow the instructions from here to enable offline support (Service worker) in my polymer starter kit clone.
Also if I change the throttling setting to offline in Chrome Developer Tools and refresh, the page comes back with the “Unable to connect to the Internet” message so clearly the caching isn’t working.
Is there anything else that I need to do?
Update: Just decoded the url (i.e. http://localhost:5000/bower_components/platinum-sw/platinum-sw-register.html&clientsClaim=true&skipWaiting=true&version=1.0) in the error message and ran it in Chrome and got a 404 error. If I remove everything after .html then the file can be found though.
Answered By: Anonymous
I was having the same issue and turned out it’s because the
platinum-sw-cache is set to
disabled in the dev development, which means service worker will not work if you run
So to test the PSK offline, you need to call
You can also ignore that
ERR_FILE_EXISTS error as explained by @pirxpilot.