Cache js, css and woff files for a week (#26591)

increases the cache duration for css and js files from 2 hours to half a year. Should they change the versionhash changes as well and a new file is fetched. Half a year should be long enough for oc updates.

Also allows caching woff files for 7 days. Currently, there is no versionhash available, but pressing F5 will also refresh the woff files.
This commit is contained in:
Jörn Friedrich Dreyer 2016-11-11 13:10:35 +01:00 committed by Roeland Jago Douma
parent ff96fffe39
commit 9802c5cdd8
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 7 additions and 2 deletions

View File

@ -21,8 +21,13 @@
</IfModule> </IfModule>
# Add cache control for static resources # Add cache control for static resources
<FilesMatch "\.(css|js|woff|svg|gif)$"> <FilesMatch "\.(css|js|svg|gif)$">
Header set Cache-Control "max-age=7200, public" Header set Cache-Control "max-age=15778463"
</FilesMatch>
# Let browsers cache WOFF files for a week
<FilesMatch "\.woff$">
Header set Cache-Control "max-age=604800"
</FilesMatch> </FilesMatch>
</IfModule> </IfModule>
<IfModule mod_php5.c> <IfModule mod_php5.c>