summaryrefslogtreecommitdiffstats
path: root/.htaccess
diff options
context:
space:
mode:
Diffstat (limited to '.htaccess')
-rw-r--r--.htaccess11
1 files changed, 11 insertions, 0 deletions
diff --git a/.htaccess b/.htaccess
index 72a96e064..d4436e563 100644
--- a/.htaccess
+++ b/.htaccess
@@ -2,3 +2,14 @@
<FilesMatch ^(.*\.pm|.*\.pl|.*localconfig.*)$>
deny from all
</FilesMatch>
+<FilesMatch (\.js|\.css)$>
+ ExpiresActive On
+ # According to RFC 2616, "1 year in the future" means "never expire".
+ # We change the name of the file's URL whenever its modification date
+ # changes, so browsers can cache any individual JS or CSS URL forever.
+ # However, since all JS and CSS URLs involve a ? in them (for the changing
+ # name) we have to explicitly set an Expires header or browsers won't
+ # *ever* cache them.
+ ExpiresDefault "now plus 1 years"
+ Header append Cache-Control "public"
+</FilesMatch>