Log in

View Full Version : Proxy servers and the main site


bit-wise
2nd February 2004, 13:35
@doom9

Proxy servers don't seem to be handling the main site very well - I get served stale content that is usually 10-30 days old - even when hitting the refresh button. (The forums work fine).

I haven't examined the headers that are served off the main site, but I usually fix this by placing a "paragma nocache" and/or "content expires" in the HTTP header to keep proxies from caching the pages.

Doom9
2nd February 2004, 13:40
paragma nocache" and/or "content expires" in the HTTP headerYou wouldn't know how this translates into the httpd.conf file, would you? By now I only have Apache servers (but both 1.x and 2.x)

mf
2nd February 2004, 14:40
Actually, no-cache is simply this:
<head><http-equiv="pragma" content="no-cache"></head>

bit-wise
2nd February 2004, 17:53
...and both Apache and PHP have a way to automatically add them to the served document's header.

The line item CacheNegotiatedDocs in the httpd.conf file should be commented, thus add the Pragma: no-cache to the HTTP header.

PHP by default also adds data to the header to prevent proxy caching, which is probably why the forums works.

If this value is presently commented, I'll stick an HTTP sniffer on my network and see what the headers are showing.