MainDoctor WhoMusicSoftware
Main Page

Alden Bates' Weblog

Feigning normality since 1973

Nudging the Proxy

Filed in: Website Management.

As I've mentioned before, I've been having trouble with Paradise's proxy server in that it tends to serve up old versions of documents from tetrap.com without consulting the server. I discovered today that you can prevent this by setting a header when the web server sends the page out. By setting the "Cache-Control" header to "proxy-revalidate", you instruct the proxy server to always recheck the server to see if there's a new version.

Setting this for the NZDWFC message board was trivial. Since it's a CGI script, I just had it write "Cache-Control: private, proxy-revalidate" as one of the headers. (The private argument specifies that the proxy server should not return a copy it cached for one user to a second user. This is essential if you do any sort of personalisation.)

However I wanted to set the header on the NZDWFC index page as well. Here's where it gets tricky. To set the "Cache-Control" header for the index document, I'd have to use the Header directive in my .htaccess file. Unfortunately when I attempted this, it broke the site. I suspect this may mean that the server is not compiled with mod_headers, which it would need to be in order for me to use the Header directive...

I've dropped a question in on the HostForWeb forums to find out if mod_headers is compiled in or not. If it turns out it is, I'm probably just doing something wrong. :) If not, I'll have to find another solution.

Posted October 12, 2004 8:09 PM

Post a comment





Tetrap.com Site Map