Skip to content

Commit 7b2321e

Browse files
committed
[htaccess] cache css/js for one day
1 parent f9d06d5 commit 7b2321e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.htaccess

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,18 @@
3434

3535
<IfModule mod_expires.c>
3636
ExpiresActive On
37-
<FilesMatch "([0-9a-f]{32}|\.(gif|jpe?g|png|webp|css|js))$">
37+
<FilesMatch "([0-9a-f]{32}|\.(gif|jpe?g|png|webp))$">
3838
<IfModule mod_headers.c>
3939
Header set Cache-Control "public, max-age=2629743"
4040
</IfModule>
4141
ExpiresDefault "access plus 1 month"
4242
</FilesMatch>
43+
<FilesMatch "\.(css|js)$">
44+
<IfModule mod_headers.c>
45+
Header set Cache-Control "public, max-age=86400"
46+
</IfModule>
47+
ExpiresDefault "access plus 1 day"
48+
</FilesMatch>
4349
#ExpiresByType text/html "now"
4450
#ExpiresByType text/plain "now"
4551
</IfModule>

0 commit comments

Comments
 (0)