Improve homepage Lighthouse performance

This commit is contained in:
Mark committed 2026-10-12 22:24:54 +02:00
1 parent 0a27463c7a
commit 8251f98313
268 files changed
+1891 -1740

No files matched your search

+7 -4
View File
@@ -70,13 +70,13 @@ Options -Indexes
</IfModule>
# ----- Browser caching -----
# No file-hashing on this site, so keep CSS/JS short (updates must propagate)
# and cache images/fonts longer. HTML is always revalidated.
# CSS/JS references carry a global content hash from tools/cache_bust.py, so
# browsers can keep those immutable assets for a year. HTML is revalidated.
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access plus 0 seconds"
ExpiresByType text/css "access plus 1 day"
ExpiresByType application/javascript "access plus 1 day"
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType image/webp "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
@@ -86,6 +86,9 @@ Options -Indexes
</IfModule>
<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
<FilesMatch "\.(css|js)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
# HSTS: after the first HTTPS visit, browsers refuse plain HTTP for this
# host. Conservative 6-month max-age, no preload/includeSubDomains so it
# stays easy to adjust. (Ignored by browsers over plain HTTP — harmless.)