sveltejs / kit

web development, streamlined
https://svelte.dev/docs/kit
MIT License
18.72k stars 1.94k forks source link

Document caching of static assets with adapter-static #12091

Open benmccann opened 7 months ago

benmccann commented 7 months ago

Describe the problem

All other adapters automatically cache static assets for you. adapter-static does not

Describe the proposed solution

Add docs stating that you need to cache the immutable directory and saying which headers to set

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

hyunbinseo commented 6 months ago

If a static site has to be deployed to a specific supported platform (e.g. Cloudflare Pages), is it better to:

If using a platform specific adapter fixes immutable assets' caching problem, maybe adding a warning on top of the adapter-static documentation is viable. I have experienced this problem before.