[Webkit-unassigned] [Bug 182444] ServiceWorker registration should store any script fetched through importScripts

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 19 13:14:19 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=182444

Jim Pick <jim at jimpick.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jim at jimpick.com

--- Comment #2 from Jim Pick <jim at jimpick.com> ---
I've been having problems with service worker generated using Google's Workbox tool not working offline after a period of time (on iOS).

I believe it's because Workbox splits its functionality into several small .js files which loaded by importScripts. The offline functionality seems to work for while, and then it doesn't. I believe it's because the workbox-v3.2.0/*.js requests in the cache are getting evicted, and they aren't stored otherwise. When if fails, I get "Safari cannot open the page because your iPhone is not connected to the Internet."

The app is simple and completely open source:

https://dat-shopping-list.glitch.me/

The code to generate the service worker is here:

https://glitch.com/edit/#!/dat-shopping-list?path=server/makeServiceWorker.js:1:0

I've tried adding a cache-control http header to the /workbox-* files of 'public,max-age=31536000,immutable' but it seems the scripts still get evicted after a short period of time.

The http headers on google's CDN for workbox only has a one hour expiry.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180519/1e358a17/attachment.html>


More information about the webkit-unassigned mailing list