4 ms·
I really wish HTTP had a no-build solution for caching static assets that didn't require either a request or a stale asset period. For example, ability to decl
by baggy_trough 3y ago
I really wish HTTP had a no-build solution for caching static assets that didn't require either a request or a stale asset period. For example, ability to declare that static assets under a path won't change unless a build version at some other path changes.
- remram 3y agoThe usual solution is: have your frontend use different URLs for the assets (example: put a hash of the content in the asset's URL) or add a build number to the asset's URL in a query parameter (example: a hash of the built frontend file, e.g. /static/chunk.min.js?v=1235abcde)
- baggy_trough 3y agoYes, I'd like to not have to modify the asset names. That requires a build step for assets.
- remram 3y agoUse the query parameter trick then.
- baggy_trough 3y agoYou can't for image assets in CSS for example.