-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
(adapter-node) Set cache header for the /static
files
#11875
Comments
Caching these by default is not a good idea because they have fixed paths so cache busting is not an option. |
@brunnerh I've crossed-out that option. For additional context for the readers: import background from '$lib/static/background.svg';
// Becomes /_app/immutable/assets/background.CKwt2LG5.svg This is why imported static assets can have a cache max-age of 1yr. Still I do hope there was an option to enable caching manually. The |
Duplicate of (part of) #3194. |
My bad. I've actually 👍 one of the comments in that issue. Note: With the |
Describe the problem
The Node.js adapter sets the
cache-control
to the/_app/immutable
files only.kit/packages/adapter-node/src/handler.js
Lines 54 to 56 in 511126b
Files in the
/static
directory - which are copied to the root of the/_app
directory - are not cached by the client.Describe the proposed solution
max-age
value.Set a defaultcache-control
for the/static
assets.Alternatives considered
No response
Importance
nice to have
Additional Information
The text was updated successfully, but these errors were encountered: