3 ms·
> First, get rid of the `etag`, `expires`, and `last-modified` headers and go with expiration caching only. Increase the `max-age` from one day (86400) to one y
by vanderZwan 8y ago
> First, get rid of the `etag`, `expires`, and `last-modified` headers and go with expiration caching only. Increase the `max-age` from one day (86400) to one year (31536000).
Since it's a statically generated website, I'd favor never expiring the cache, and using cache-busting hashes instead. That way the cache is only emptied when the file actually changes.
- protonfish 8y agoUnfortunately there is no "never" setting. The HTTP spec recommends 1 year.
- user111233 8y agoIsn't the etag just a hash of the content?
- protonfish 8y agoIt can be, but doesn't need to be as long as it is some sort of indication of the uniqueness of the content. A last modified date should work in the same way.