Hacker News new | ask | show | jobs
by iainmerrick 239 days ago
The standard solution is to have small top-level HTML files with short expiration (or no caching at all), then all the other assets (CSS, JS, images) have content-hashed filenames and are cached indefinitely.

Vite gives you that behaviour out of the box.

1 comments

I design and architect things specifically for the purpose they serve. What you describe, while popular and workable is putting the horse behind the carriage.