3 ms·
Ask HN: Should I store my js/css bundles on localStorage for better page load?
What are the pros/cons?
- tantalor 10y agoCheck out service workers, they are designed to solve this problem, https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers https://developer.mozilla.org/en-US/docs/Web/API/Service_Wor... In addition to caching JS/CSS, you can also cache your main document so your app can work offline.
- willstepp 10y agoAre you familiar with HTTP cache headers? Better to focus on your application and let the browser think about that stuff, if possible.