]> sipb.mit.edu Git - ikiwiki.git/commitdiff
page.tmpl: Add Cache-Control must-revalidate to ensure that users (especially of...
authorJoey Hess <joey@gnu.kitenet.net>
Wed, 31 Mar 2010 21:51:46 +0000 (17:51 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Wed, 31 Mar 2010 21:52:58 +0000 (17:52 -0400)
Since Firefox version 3, it's done aggressive caching of visited pages, and
does not, by default, check if the cached content is still valid when
reloading or revisiting a page. By default, Firefox seems to not re-contact
the web server at all. Compare with eg, Epiphany and Chromium, which appear
to always check, and get back a 304 when the page is unchanged.

This header makes Firefox do the right thing, at least for html files. It
still over-caches if css, javascript, images, etc, are changed.

debian/changelog
templates/page.tmpl

index 5ec52d3c0e90c90fea79637f5a36c020af5360a5..bbca7cffe69e0e30bdeba0272333dc56a6f82907 100644 (file)
@@ -23,6 +23,8 @@ ikiwiki (3.20100324) UNRELEASED; urgency=low
   * openid: Use Openid Simple Registration or OpenID Attribute Exchange
     to get the user's email address and username. (Neither is yet
     used, but they are available in the session object now.)
+  * page.tmpl: Add Cache-Control must-revalidate to ensure that users
+    (especially of Firefox) see fresh page content.
 
  -- Joey Hess <joeyh@debian.org>  Sat, 13 Mar 2010 14:48:10 -0500
 
index 968066a19e8e0db5a045fa3a9f1ea04bdb3f979a..c24f88823e29a8bd008752141017e3cc73eee238 100644 (file)
@@ -3,6 +3,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv="Cache-Control" content="must-revalidate" />
 <title><TMPL_VAR TITLE></title>
 <TMPL_IF NAME="FAVICON">
 <link rel="icon" href="<TMPL_VAR BASEURL><TMPL_VAR FAVICON>" type="image/x-icon" />