From 8171b505cab1ef8ad16f7f9257cf92741beb4383 Mon Sep 17 00:00:00 2001 From: Donatas Puidokas Date: Tue, 25 Oct 2022 21:32:35 +0300 Subject: [PATCH 1/3] Add cache-control for resources --- client/src/public/.htaccess | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/client/src/public/.htaccess b/client/src/public/.htaccess index 74d46e25..40ad67cb 100644 --- a/client/src/public/.htaccess +++ b/client/src/public/.htaccess @@ -11,4 +11,21 @@ RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" - \ No newline at end of file + + + + # Turn on the module. + ExpiresActive on + # Set the default expiry times. + ExpiresDefault "access plus 1 days" + ExpiresByType image/jpg "access plus 1 month" + ExpiresByType image/svg+xml "access 1 month" + ExpiresByType image/jpeg "access plus 1 month" + ExpiresByType image/png "access plus 1 month" + ExpiresByType text/css "access plus 1 month" + ExpiresByType application/javascript "access plus 1 days" + ExpiresByType application/wasm "access plus 1 days" + ExpiresByType application/x-font-ttf "access plus 1 month" + ExpiresByType image/ico "access plus 1 month" + ExpiresByType text/html "access plus 1 days" + From b0172eeb6da4ebd880397367a3c530bc25c20602 Mon Sep 17 00:00:00 2001 From: Donatas Puidokas Date: Tue, 1 Nov 2022 08:35:27 +0200 Subject: [PATCH 2/3] Removing js/wasm caching control --- client/src/public/.htaccess | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/public/.htaccess b/client/src/public/.htaccess index 40ad67cb..8a01ae45 100644 --- a/client/src/public/.htaccess +++ b/client/src/public/.htaccess @@ -23,8 +23,9 @@ Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; prelo ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 month" - ExpiresByType application/javascript "access plus 1 days" - ExpiresByType application/wasm "access plus 1 days" + # Till hash filename is implemented + #ExpiresByType application/javascript "access plus 1 days" + #ExpiresByType application/wasm "access plus 1 days" ExpiresByType application/x-font-ttf "access plus 1 month" ExpiresByType image/ico "access plus 1 month" ExpiresByType text/html "access plus 1 days" From 3ae33179b49dcb9c49d7938b9eae2dcde927aafa Mon Sep 17 00:00:00 2001 From: Donatas Puidokas Date: Tue, 1 Nov 2022 08:35:50 +0200 Subject: [PATCH 3/3] Removing js/wasm caching control --- client/src/public/.htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/public/.htaccess b/client/src/public/.htaccess index 8a01ae45..f674c49f 100644 --- a/client/src/public/.htaccess +++ b/client/src/public/.htaccess @@ -17,7 +17,7 @@ Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; prelo # Turn on the module. ExpiresActive on # Set the default expiry times. - ExpiresDefault "access plus 1 days" + #ExpiresDefault "access plus 1 days" ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/svg+xml "access 1 month" ExpiresByType image/jpeg "access plus 1 month"