I don't understand the use. Caching is already implemented by HTTP Cache-Control headers so unless you need a very complex strategy, it should already work without having another JS implementation client side...?
example: JUST ONE ACTION: you open some /last.html page with short text & links list of latest five top articles... The network is down by some reason - and what you got with "Caching is already implemented by HTTP Cache-Control" - only cached last.html Your device still offline and you can just stare at list with links on content you wanted to read, but with #sw you can implement custom logic - get from API .json with {id, title, text} of last five news and without any connection sw.js can handle requests and do something - and you can click any link listed on /last.html and get full page content, but it's just an example of what you can't get with HTTP Cache-Control
Dude has chill ;)
You guys rock! Workbox is the best thing for PWA 🎉
why i am getting "Current page does not response with 200 when offline"
Need to try this! 🙋♂️
the worbox version 3.0.0 is not loading(failed to fetch resources) while loading service-worker can u help plz
with PWA Libraries they mean using some official apis (fetch, push, etc.) ?
I don't understand the use. Caching is already implemented by HTTP Cache-Control headers so unless you need a very complex strategy, it should already work without having another JS implementation client side...?
example: JUST ONE ACTION: you open some /last.html page with short text & links list of latest five top articles... The network is down by some reason - and what you got with "Caching is already implemented by HTTP Cache-Control" - only cached last.html Your device still offline and you can just stare at list with links on content you wanted to read, but with #sw you can implement custom logic - get from API .json with {id, title, text} of last five news and without any connection sw.js can handle requests and do something - and you can click any link listed on /last.html and get full page content, but it's just an example of what you can't get with HTTP Cache-Control
@@9kopbworkboxSW.router.registerRoute(
'/path/to/image',
workboxSW.strategies.networkFirst({networkTimeoutSeconds: 3})
);
@@9kopb Seems like a lot of work when my network is down like 0.001% of the time.