Cache static files #1782
maciej-jezierski
started this conversation in
Ideas
Replies: 2 comments 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 |
1 reply
|
Shouldn't be "strings.HasSuffix()" everywhere? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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
All reactions