diff options
| author | 2025-05-07 10:53:59 +0200 | |
|---|---|---|
| committer | 2025-05-07 10:53:59 +0200 | |
| commit | 91d32acfdce7410ae9e5ff6f30b8a9ff91512884 (patch) | |
| tree | 1e7367c90ed9e3f9acde5fe0cff9bc45e5b8cf78 /p/.htaccess | |
| parent | 3f187395eaed8d6e455adb454a65f9e2503f390a (diff) | |
HTTP Cache-Control immutable (#7552)
Start using `Cache-Control: immutable` for some resources served with a timestamp.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control#immutable
The `<If>` directive requires Apache 2.4+
Diffstat (limited to 'p/.htaccess')
| -rw-r--r-- | p/.htaccess | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/p/.htaccess b/p/.htaccess index e7376e46e..e6d024c5e 100644 --- a/p/.htaccess +++ b/p/.htaccess @@ -39,6 +39,11 @@ AddDefaultCharset UTF-8 <IfModule mod_headers.c> <FilesMatch "\.(css|gif|html|ico|js|png|svg|woff|woff2)$"> Header merge Cache-Control "public" + # If you run an old Apache 2.2-, comment out the following <If> section + <If "%{QUERY_STRING} =~ /^[0-9]+$/"> + # For requests like `frss.css?1746304092` + Header merge Cache-Control "immutable" + </If> </FilesMatch> Header edit Set-Cookie ^(.*)$ "$1; SameSite=Lax" </IfModule> |
