summaryrefslogtreecommitdiffstats
path: root/.htaccess
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-07-03 21:38:38 +0200
committerDylan William Hardison <dylan@hardison.net>2017-07-07 00:19:20 +0200
commit6f68125893590fc9de60185f5535bae12adbcb54 (patch)
tree6d7b2b7885a750826655cf3896d7fd72791623b3 /.htaccess
parente3e2c7c0273499f832ee692ca63620cd8aa8bda1 (diff)
downloadbugzilla-6f68125893590fc9de60185f5535bae12adbcb54.tar.gz
bugzilla-6f68125893590fc9de60185f5535bae12adbcb54.tar.xz
Bug 1377232 - Revert code from bug 1361890
Diffstat (limited to '.htaccess')
-rw-r--r--.htaccess21
1 files changed, 21 insertions, 0 deletions
diff --git a/.htaccess b/.htaccess
index 30aff3458..b07ce9a0d 100644
--- a/.htaccess
+++ b/.htaccess
@@ -2,6 +2,27 @@
<FilesMatch (\.pm|\.pl|\.tmpl|\.swf|localconfig.*|cpanfile)$>
deny from all
</FilesMatch>
+<IfModule mod_expires.c>
+<IfModule mod_headers.c>
+<IfModule mod_env.c>
+ <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>
+
+ # This lets Bugzilla know that we are properly sending Cache-Control
+ # and Expires headers for CSS and JS files.
+ SetEnv BZ_CACHE_CONTROL 1
+</IfModule>
+</IfModule>
+</IfModule>
# Allow ZeroClipboard for access to the clipboard
<Files "ZeroClipboard.swf">