Cache static files #1782
maciej-jezierski
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Do you know much of this is in standard library and what is not? Looking at http.serveContent implementation it mentions ETag and handles other headers
Static middleware and |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
recently I am reading the caching solution and came to etag HTTP header and cache policy. I made this a sample implementation, which might be not ideal, but enable cache against the static assets. Maybe it could be converted to some middleware plugin. It allows the page to be faster and save brand switch.
Some reading: https://web.dev/uses-long-cache-ttl/?utm_source=lighthouse&utm_medium=unknown
Beta Was this translation helpful? Give feedback.
All reactions