Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

http headers for cache control etc

Status
Not open for further replies.

humbug

Technical User
Sep 11, 2000
3
GB
I'm running a site (actually several) on a shared Unix apache server which belongs to an ISP, and over which I have no actual control. One class of page that I create is pretty volatile, and it would be best if users got the latest version every time they accessed them. Most have the general title item<number>.htm, one is contents.htm.

I gather that I can set up an .htaccess file in my directory to force http headers into these pages (and I'm told that this permission is available for some classes of command), and someone who knows about ASP (which I don't) told me what I want to do is set up what ASP would set up if I sent :

Response.Expires = -1
Response.ExpiresAbsolute = #1/1/1980#
Response.AddHeader &quot;cache-control&quot;, &quot;no-store, must-revalidate, private&quot;
Response.AddHeader &quot;Pragma&quot;, &quot;no-cache&quot;
Response.CacheControl = &quot;no-cache&quot;

I've had a look at the Apache documentation, and it seems as if these concepts map onto http headers OK.

It seems I can enclose the relevant mod commands in a <Files> bracket, but I'm keen for some advice; an example .htaccess; that sort of thing, especially since I don't want to screw up what is a live site.

Is there any way I can monitor what http headers are being sent with a given page?

Thanks in anticipation.

humbug
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top