-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache-Control on static files #9
Comments
Yes this can work on Deno Deploy the example is doing so: Deno Deploy has a lot of weird support conditions so it just depends what packages and APIs you're using. From my experience it is slow and not a good hosting platform for websites.
sveltekit-adapter-deno/files/mod.ts Lines 58 to 61 in 12022ab
For custom static files it would be too opinionated to add addtional headers. I don't think other SvelteKit adapters provide an option. The node adapter suggestions making a custom server. You could do that for You could also proxy the server and at headers at a higher level. Cloudflare Workers would be one way to achieve this. |
Thanks for the quick answer. It seems svelte does not handle static caching at all so its an issue every adapter faces. I might do further research on this subject and try something of my own. As for Deno Deploy, We're using it to host a static pre-rendered website and for this use case its fast enough so I wanted to improve its performance even more by providing caching. Anyway, thank you again 😄 |
Hi,
Would it be possible to set a Cache-Control header for the static files? Also, do you know if it would work with Deno Deploy?
Thanks
The text was updated successfully, but these errors were encountered: