diff options
| author | 2021-12-21 23:43:59 +0100 | |
|---|---|---|
| committer | 2021-12-21 23:43:59 +0100 | |
| commit | 46cb8644c4d70644a283b9e8efa3e25fdc8d3d41 (patch) | |
| tree | a201d97fd7006e467d023526716cec7abd4693c9 /p | |
| parent | ed8703e674770c092b9d9291c560df5c14e84a45 (diff) | |
Fix: Compressed & Cached JS files (#4075)
* Update .htaccess
* Explicit MIME type for .js
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Configuring_server_MIME_types
https://www.iana.org/assignments/media-types/media-types.xhtml
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'p')
| -rw-r--r-- | p/.htaccess | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/p/.htaccess b/p/.htaccess index 55264a4f4..f2f2ad901 100644 --- a/p/.htaccess +++ b/p/.htaccess @@ -6,6 +6,7 @@ FileETag None AddDefaultCharset UTF-8 <IfModule mod_mime.c> + AddType application/javascript .js AddType application/json .map AddCharset UTF-8 .html @@ -13,18 +14,18 @@ AddDefaultCharset UTF-8 </IfModule> <IfModule mod_deflate.c> - AddOutputFilterByType DEFLATE application/javascript application/json application/xhtml+xml image/svg+xml text/css text/html text/javascript + AddOutputFilterByType DEFLATE application/javascript application/json application/xhtml+xml image/svg+xml text/css text/html </IfModule> <IfModule mod_expires.c> ExpiresActive on + ExpiresDefault "access plus 1 month" ExpiresByType application/font-woff "access plus 1 month" ExpiresByType application/font-woff2 "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" ExpiresByType application/xhtml+xml "access plus 1 month" ExpiresByType image/x-icon "access plus 1 month" ExpiresByType text/html "access plus 1 month" - ExpiresByType text/javascript "access plus 1 month" <FilesMatch "\.php$"> ExpiresActive Off </FilesMatch> |
