Reputation: 1132
In other words, should I be able to "Refresh" the page when it is cached in "Cache Storage" via service worker?
For example, go to the ebook demo see: https://elements.polymer-project.org/elements/platinum-sw?view=demo:demo/index.html&active=platinum-sw-register
After service worker completes, we see this in the cache storage.
Then we go to airplane mode, AND we refresh the page via the browser (we expect the page to load from the cache storage) BUT we see "Offline" and it appears that the cache storage is empty.
But when we use https://jakearchibald.github.io/trained-to-thrill it seems to work as expected. But we prefer the simpler platinum-sw polymer approach :)
Picture of "trained to thrill" online:
Picture of "trained to thrill" offline and pressing refresh:
"trained to thrill" seems to work when the browser page is refreshed. And even when the "refresh" button inside the page is pressed. The latter shows that extra "connectivity derailed" message. The browser refresh does not show the "connectivity derailed" message, but the page is still available, UNLIKE the platinum-sw offline ebook example above.
Our question is should a user be able to press the browser refresh when the application is properly cached via platinum-sw tags?
Oddly, when I press the back button sometimes, the page will start working. That might be caused by the browser cache.
Is there a way in chrome to see what is in the "browser cache" vs. "cache storage" vs. "application cache" all on one page? :)
Upvotes: 0
Views: 231
Reputation: 1132
It appears that the link that you must use to get the offline caching to work properly is:
https://elements.polymer-project.org/bower_components/platinum-sw/demo/index.html
and not:
Upvotes: 0