|
|
|
|
|
by josteink
4110 days ago
|
|
> To be precise, code caching has been in major browsers for a while, but it was in-memory cache. Chromium is the first to make it persistent with this update. Does this mean developers will need to put in (additional) efforts to do cache invalidation when they've updated their code? |
|
1) Changing the file name, so it's a completely new file to the browser and thus downloaded (usually by incrementing the version number, like myApp.1.0.1.js).
2) Setting different cache rules on the server for different file types. If the updates aren't critical, you can let the cache run it's course. So your cache rules could be 1 month for images, 1 day for HTML, and 1 hour for JS files.