Make cache headers configurable for contents of `static`
See original GitHub issueDescribe the bug
Cache Headers for images in the static folder are set to public,max-age=0,must-revalidate
.
This happens even in production builds (svelte-kit build, svelte-kit start
).
Logs
To Reproduce Prepared a example repo. https://github.com/Maggi64/svelte-kit-cache-header-issue
Expected behavior As far as i understand the code, cache headers should be set to immutable. Am i missing something here?
Thanks for the great work guys. Keep it up!
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
Guide for Caching and HTTP Cache Headers for Static Content
Best practices for cache management of static assets and using the correct cache headers like Cache-Control.
Read more >Adding Cache-Control headers to Static Files in ASP.NET Core
In this post I'll show how you can add caching headers to the files served by the StaticFileMiddleware to increase your site's performance....
Read more >Caching headers for static content: cache-control: private is sen
Hi everybody. We have setup caching for static content as described in ...
Read more >How to Cache Static Content with Varnish Cache - Section.io
One common setting that can prevent Varnish Cache from caching items by default is when the website server settings add headers such as...
Read more >Caching headers: A practical guide for frontend developers
Find out how different headers influence browser cache, how they relate to proxy servers, and how popular services created in React serve ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
They said “We have icons that will never change and if we would alter the path” and were also asking for the cache header to be set to
immutable
, so I think they do have stable contentsMakes sense, in sapper you could configure sirv yourself and we treated those images as unchangeable. Might be a good idea to add a setting to change this behavior.
We have icons that will never change and if we would alter the path.
Thanks for the quick response.