View on GitHub

guides

Prepare for asset caching

Background

Remember that all your files will be cached by - the browser, a proxy, CDN - you never know what, when and for how long.

It’s necessary to develop under this assumption from the very beginning.

Rules

How to test this behavior?

Build the production version and look for fetched files under the Network tab of your Dev Tools.

Any filename that isn’t unique will cause problems and will be cached.

Implementation hints

Use content hash in your filenames.