From 10f4954b4530a67d88c66ba8e397ee81487f4752 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Tue, 20 Jul 2010 20:34:41 -0700 Subject: Bug 428313: Properly expire the browser's CSS and JS cache when there are new versions of those files. This also eliminates single-file skins and should also allow Extensions to have skins. r=glob, a=mkanat --- .htaccess | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to '.htaccess') diff --git a/.htaccess b/.htaccess index 72a96e064..d4436e563 100644 --- a/.htaccess +++ b/.htaccess @@ -2,3 +2,14 @@ deny from all + + 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" + -- cgit v1.2.3-24-g4f1b