
Ask HN: Should I store my js/css bundles on localStorage for better page load? - lookupmobile
What are the pros&#x2F;cons?
======
tantalor
Check out service workers, they are designed to solve this problem,

[https://developer.mozilla.org/en-
US/docs/Web/API/Service_Wor...](https://developer.mozilla.org/en-
US/docs/Web/API/Service_Worker_API/Using_Service_Workers)

In addition to caching JS/CSS, you can also cache your main document so your
app can work offline.

------
willstepp
Are you familiar with HTTP cache headers? Better to focus on your application
and let the browser think about that stuff, if possible.

