Giter Site home page Giter Site logo

Comments (7)

LeoColomb avatar LeoColomb commented on June 11, 2024

Thanks for opening this issue @creopard.
That being said, the behavior you are facing is weird.
Indeed, the unit test framework used to validate the configuration explicitly checks Cache-Control value:

https://github.com/h5bp/server-configs-test/blob/a3dee296da841834aa2d130c1f887751553a5e58/lib/basic-file-access.json#L11

I'm not excluding the option that these tests are weak, but I'd appreciate more investigation on your side.
Are you sure LiteSpeed is following ExpiresDefault same as Nginx?

from server-configs-apache.

creopard avatar creopard commented on June 11, 2024

Are you sure LiteSpeed is following ExpiresDefault same as Nginx?
I've looked up the default config, although I can't access the one used by the webhoster. It seems the default comes from the main/global config file: https://openlitespeed.org/kb/openlitespeed-directive-working-in-progress/#expiresDefault

expiresDefault A604800
expiresByType image/*=A604800, text/css=A604800, and so on...

meaning that everything defaults to 1 week.
I was also wondering where that 1 week setting initially came from.

Assumption: If the value of expiresDefault will be overridden by the .htaccess with access plus 1 year, this seeting does not seem to affect the preset done in the above main config file expiresByType image/*=A604800 but only types that have no default setting yet.

Hence, (in my case) I need to explicitly set expiresByType image/* as well in the .htaccess file order to override the default from the main file.

It would be great if anybody else could also look up the expiry dates of images in a real world example.
Or is it just me? In the latter case, we can close this issue of course ;-)

from server-configs-apache.

LeoColomb avatar LeoColomb commented on June 11, 2024

Assumption: If the value of expiresDefault will be overridden by the .htaccess with access plus 1 year, this seeting does not seem to affect the preset done in the above main config file expiresByType image/*=A604800 but only types that have no default setting yet.

That sounds to be the good assumption ๐Ÿ˜Š
But it is for the same assumption that I'd advocate to avoid uncommenting this section.
It's always easier to raise the granularity when needed than "fixing" the upper specific generics.
I hope it makes sense!

from server-configs-apache.

creopard avatar creopard commented on June 11, 2024

Sure, I would just make people (who can't see the webhosters config, if they are on shared environments) aware that the entry
ExpiresDefault "access plus 1 year"
does not seem to be an automatic fallback scenario for every type that have not been mentioned in the .htaccess explicitly.

from server-configs-apache.

LeoColomb avatar LeoColomb commented on June 11, 2024

@creopard Sounds reasonable. Would you like to submit a PR to add this note?

from server-configs-apache.

creopard avatar creopard commented on June 11, 2024

Added pull request: #371

from server-configs-apache.

LeoColomb avatar LeoColomb commented on June 11, 2024

Thanks!

from server-configs-apache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.