Open pikanezi opened 2 months ago
Yes this can work on Deno Deploy the example is doing so: https://sveltekit-adapter-deno.deno.dev/
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.
Cache-Control
headers are set for the immutable SvelteKit static files:
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 sveltekit-adapter-deno
by copying build/mod.ts
.
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