0

I'm on an apache 2 web server, and I'm serving the following site: torchbearersakron.com

Everywhere except IE7/Vista IE8/Vista the cache seems to work wonderfully. On these two systems however, something isn't right, and the entire page loads from the server every time.

Is there something I can do in my headers or meta tags that would fix it? Is there something I am doing that is breaking it?

Issac Kelly
  • 123
  • 6

1 Answers1

0

Presumably the cache settings of torchbearersakron.com have been changed in the 4 months since you've asked this question, since this is the response I get from the home page:

HTTP/1.0 200 OK
Date: Fri, 12 Feb 2010 21:12:33 GMT
Server: Apache/2.2.4 (Ubuntu) mod_python/3.3.1 Python/2.5.1 PHP/5.2.3-1ubuntu6.4 mod_ssl/2.2.4 OpenSSL/0.9.8e
X-Powered-By: PHP/5.2.3-1ubuntu6.4
Set-Cookie: PHPSESSID=61d5ecec89d3d5c29d85aa1e3629b5b5; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Encoding: gzip
Vary: Accept-Encoding
Content-Length: 2695
Content-Type: text/html; charset=utf-8

If you wanted to make this cacheable, you'd get rid of the Pragma header, and change the Expires to the date at which this page expires, and change Cache-Control to specify the max-age to cache the page; for example, to cache for 1 hour:

HTTP/1.0 200 OK
Date: Fri, 12 Feb 2010 21:12:33 GMT
Expires: Fri, 12 Feb 2010 22:12:33 GMT
Cache-Control: public, max-age=3600

If you're using apache2, use mod_cache for this.

But if you set up your cache headers correctly and still see ie not using its cache, check the "Temporary Internet Files" setting in ie:

  1. Select the "Internet Options" menu item from the "Tools" menu in ie.
  2. Click the "Settings" button in the "Browsing history" section of the "General" tab.
  3. Select the "Automatically" radio button under the "Check for newer versions of stored pages" heading.
  4. Click OK, and OK again.

If the "Every time I visit the webpage" radio button is selected instead of "Automatically", it doesn't matter what cache headers you send -- ie will make a new request to the server for it every time you navigate to your page through the browser ui.

Also note that the Vary header can also screw up ie's caching model (see http://blogs.msdn.com/ieinternals/archive/2009/06/17/Vary-Header-Prevents-Caching-in-IE.aspx). Vary: Accept-Encoding should be fine, though.

Justin Ludwig
  • 1,006
  • 7
  • 8