From d3af7c03be92c466ab0b3f42ab0696c7d42ccff5 Mon Sep 17 00:00:00 2001 From: Alexis Gousseau Date: Mon, 27 Apr 2026 10:09:37 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=94=A7=20add=20assets=20cache=20i?= =?UTF-8?q?n=20.htaccess?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/.htaccess | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/public/.htaccess b/public/.htaccess index 1412a04..9ce7c3d 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -23,3 +23,68 @@ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] + + + ExpiresActive On + + # Images + ExpiresByType image/jpg "access plus 1 year" + ExpiresByType image/jpeg "access plus 1 year" + ExpiresByType image/png "access plus 1 year" + ExpiresByType image/gif "access plus 1 year" + ExpiresByType image/webp "access plus 1 year" + ExpiresByType image/svg+xml "access plus 1 year" + + # CSS / JS + ExpiresByType text/css "access plus 1 year" + ExpiresByType text/javascript "access plus 1 year" + ExpiresByType application/javascript "access plus 1 year" + ExpiresByType application/x-javascript "access plus 1 year" + + # WOFF / WOFF2 / Fonts + ExpiresByType application/font-woff "access plus 1 year" + ExpiresByType font/woff "access plus 1 year" + ExpiresByType application/font-woff2 "access plus 1 year" + ExpiresByType font/woff2 "access plus 1 year" + + # Favicon + ExpiresByType image/x-icon "access plus 1 year" + + + + Header set Cache-Control "public, max-age=31536000, immutable" + + + + AddOutputFilterByType BROTLI_COMPRESS text/html text/css text/plain text/xml text/javascript application/javascript application/x-javascript + AddType text/plain .br + + + + AddOutputFilterByType DEFLATE text/html + AddOutputFilterByType DEFLATE text/plain + AddOutputFilterByType DEFLATE text/xml + AddOutputFilterByType DEFLATE text/css + AddOutputFilterByType DEFLATE text/javascript + AddOutputFilterByType DEFLATE application/javascript + AddOutputFilterByType DEFLATE application/x-javascript + AddOutputFilterByType DEFLATE application/xml + AddOutputFilterByType DEFLATE application/xhtml+xml + AddOutputFilterByType DEFLATE application/rss+xml + AddOutputFilterByType DEFLATE image/svg+xml + + + + AddType application/javascript .js + AddType font/woff2 .woff2 + AddType application/font-woff2 .woff2 + AddType application/font-woff .woff + AddType font/woff .woff + AddType image/svg+xml .svg + + + + FileETag None + Header unset ETag + Header unset Set-Cookie + \ No newline at end of file