summaryrefslogtreecommitdiffstats
path: root/.htaccess
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2016-11-11 13:10:35 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2016-11-14 16:52:28 +0100
commit9802c5cdd80a81570c3aef35607302164c5c1d81 (patch)
tree5428004632ffd373dfc90865fb8e4eca04f5a347 /.htaccess
parentff96fffe39c09efa60233988637d2fd68828a2ea (diff)
downloadnextcloud-server-9802c5cdd80a81570c3aef35607302164c5c1d81.tar.gz
nextcloud-server-9802c5cdd80a81570c3aef35607302164c5c1d81.zip
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.
Diffstat (limited to '.htaccess')
-rw-r--r--.htaccess9
1 files changed, 7 insertions, 2 deletions
diff --git a/.htaccess b/.htaccess
index 206d2be33bc..c5dbf194b04 100644
--- a/.htaccess
+++ b/.htaccess
@@ -21,8 +21,13 @@
</IfModule>
# Add cache control for static resources
- <FilesMatch "\.(css|js|woff|svg|gif)$">
- Header set Cache-Control "max-age=7200, public"
+ <FilesMatch "\.(css|js|svg|gif)$">
+ 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>
</IfModule>
<IfModule mod_php5.c>