-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
Fallback with ExpiresDefault does not seem to include images #370
Comments
Thanks for opening this issue @creopard. I'm not excluding the option that these tests are weak, but I'd appreciate more investigation on your side. |
meaning that everything defaults to 1 week. Assumption: If the value of Hence, (in my case) I need to explicitly set It would be great if anybody else could also look up the expiry dates of images in a real world example. |
That sounds to be the good assumption 😊 |
Sure, I would just make people (who can't see the webhosters config, if they are on shared environments) aware that the entry |
@creopard Sounds reasonable. Would you like to submit a PR to add this note? |
Added pull request: #371 |
Thanks! |
Expected result:
Image files like PNG, GIF, JPG, WEBP, etc. use the default fallback time thats defined with "ExpiresDefault", i.e. 1 year.
Actual result:
Google Lighthouse complaines about "Serve static assets with an efficient cache policy" as the images will only have a cache TTL of 7 days (=604800 seconds).
Tested Browsers: Chrome 123, Firefox 124
Webserver: I do not run an Apache webserver, but a "Litespeed" webserver (Apache compatible alternative).
Issue:
With the current setting of
server-configs-apache/dist/.htaccess
Line 1096 in 1dc1bbd
The HTTP answer header of an image will look like this:
Fix:
Uncommenting
server-configs-apache/dist/.htaccess
Line 1139 in 1dc1bbd
will set the cache TTL correctly to 1 year (= 31536000 seconds).
So it seems that the currently commented section of "Generic:" does not use the fallback time of "ExpiresDefault" as initially anticipated?
The text was updated successfully, but these errors were encountered: