Ralph Yozzo
Ralph Yozzo

Reputation: 1132

platinum-sw "simple offline-capable eBook reader" should it work offline AND through a refresh?

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.

enter image description here

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.

enter image description here

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: enter image description here

Picture of "trained to thrill" offline and pressing refresh: enter image description here

"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

Answers (1)

Related Questions