-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
consider setting cache-control:immutable #8655
Comments
This is a good idea but might not be of real benefit until it is supported by more browsers as it is just a bunch of wasted bytes unless you use a recent version of Firefox. |
cc @cdnjs/owners @terinjokes |
This looks pretty cool. I don't think we should implement it until I change the backend to reduce the update failures we have from time to time (and, perhaps, officially supporting "latest") |
Hello! What about adding |
Hi @terinjokes, I think it'll be great to enable it no matter it the backend on Cloudflare side changes as this can really help improve performance by reducing the cache validation, am I right? |
@PeterDaveHello Chrome still does not have this implemented, should I raise this to Cf to ask them to set Cache control to be immutable when a Firefox UA is detected? |
Everyone apart from Chrome (and probable IE) implement this now |
@MatthewSteeples Yeah, I think it best we implement it as it should improve performance. I will contact Cf and post any updates here :) |
@xtuc would you be able to help with getting this added? |
According to https://caniuse.com/#feat=mdn-http_headers_cache-control_immutable the support is pretty low |
Currently, we send https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#Extension_Cache-Control_directives notes that if a UA doesn't recognize (I'm no expert on this though) |
@MattIPv4 that sound right. I sent the header to my Chrome and it didn't fail. That said, I'm not sure how to check that it works |
@xtuc Simple. Just wait a year and see if it expires. /s |
Chrome's dev tools should show if the resource was fetched from cache or not, but I'm not sure of any way to really confirm how long it's planning to hold the resource for in cache. |
which is a cache-control extension implemented already in firefox. I think this is reasonable, as you already set a large cache expiration date
Cache-Control: public, max-age=30672000
This could help reducing calls to the server resulting in 304 not-modified and thereby also reduce some privacy issues (less requests - less traceability)...
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: