Hacker News new | ask | show | jobs
by mikojan 720 days ago
You need to use some kind of automation to fingerprint your files for optimal caching.

Where applicable there simply does not exist a better caching strategy than fingerprint plus Cache-Control: immutable

1 comments

Well but I might have a hundred files, only one of which changed.

The 99 other ones are still in the browser cache and don't need to be re-(down)loaded.

If I bundle everything, then I have to scrap and reload everything, which is probably great for the final user, but not the developer actively modifying it.

A bundler does not necessarily produce a single file. I have not tried Mako. But from the docs it appears to do code splitting just like the others.