DEV Community

Discussion on: Intro to Progressive Web Apps (PWA)

Collapse
bayuangora profile image
Bayu Angora

I installed PWA on my Hugo website. And offline mode is only works for page that visited (cached) before. Is there a way to make offline mode works to whole page, even without visiting page by page before?

Collapse
s1hofmann profile image
Simon Hofmann

It’s possible to do pre-caching with ServiceWorkers, so all your pages would be cached before the SW is installed. You can either build your own strategies, or take a look at workbox, which comes with many „common“ caching patterns.

Collapse
talk2sohail profile image
Sohail

Hey..
I was resonating at the same idea you just mentioned..

I think it is possible through service workers..as it sits between the client and the server .
We can fetch things(not yet visited) in sw and therefore be able to cache it.
Hope it helps.
I am still working on a PWA.