Comments (7)
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:
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.
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.
Assumption: If the value of
expiresDefault
will be overridden by the .htaccess withaccess plus 1 year
, this seeting does not seem to affect the preset done in the above main config fileexpiresByType 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.
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.
@creopard Sounds reasonable. Would you like to submit a PR to add this note?
from server-configs-apache.
Added pull request: #371
from server-configs-apache.
Thanks!
from server-configs-apache.
Related Issues (20)
- Feature request: video/mov in .htaccess? HOT 4
- SSL auto renewal blocked by www redirect HOT 2
- Missing version in custom `.htaccess` builds HOT 8
- `DirectoryIndex` comment if pre-compressed content is enabled HOT 4
- Question: mpm_winnt_module HOT 3
- Remove `image/avif-sequence` MIME type HOT 6
- Variable evaluation in build script HOT 2
- Add build parameter to generate `.htaccess` without comments HOT 2
- `ServerTokens Prod` missing HOT 2
- Missing `<IfModule mod_authz_core.c>` block HOT 1
- Remove `<IfModule>` from `Options -Indexes` HOT 1
- Add `<IfModule http2_module>` for h2 protocol support HOT 9
- Add note about `RewriteOptions Inherit` HOT 3
- `Permissions-Policy` header for Google โTopics APIโ HOT 1
- Add `Document Policy` to security section HOT 2
- Add `Shared Brotli` and `Shared Zstandard` (zstd) HOT 2
- Error with `Permissions-Policy` header: Unrecognized feature: `'document-domain'` HOT 1
- Format `Content-Security-Policy` header directives HOT 4
- Add `ExpiresByType` for `audio/mp4` with `"access plus 1 year"` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server-configs-apache.