From 4ead7efc4093274f14e2b11cf0916b8448d738df Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 1 Dec 2023 18:56:55 +0100 Subject: [PATCH] htaccess: cache control headers to image assets Avoid some modification checks as files are near-immutable. --- .htaccess | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.htaccess b/.htaccess index 22602d7..90f32b4 100644 --- a/.htaccess +++ b/.htaccess @@ -34,9 +34,12 @@ RewriteCond %{HTTP_ACCEPT} \bimage/webp RewriteCond %{DOCUMENT_ROOT}/$1.webp -f RewriteRule (.*)\.jpg$ $1.webp -# allow browsers to cache for upto a month +# allow browsers to cache static assets for upto a month - + +Header set Cache-Control "max-age=2592000" + + Header set Cache-Control "max-age=2592000" Header set Access-Control-Allow-Origin "*" -- 2.30.0