The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

dschulten (8) [Avatar] Offline
#1
You recommend using service worker as a cache for the app's ui shell. For that, the classic http cache is also an option, even in pretty old browsers and absence or failure of js. Maybe a box which discusses pros and cons of both would be helpful. For a static ui shell I would go for classic caching, but stand to be convinced why service worker is better.
dean.hume (6) [Avatar] Offline
#2
Hi - thank you for your question!

I agree with you, the classic http cache is a great option for browsers that don't support Service Workers. In fact, HTTP cache and Service Workers go hand in hand.

I highly recommend reading this article by Jake Archibald about caching best practices.

https://jakearchibald.com/2016/caching-best-practices/

It does a much better job of explaining this than I could in a single post.

Hope that helps - please let me know if you have any other questions!