- From: Andrew Daviel <andrew@andrew.triumf.ca>
- Date: Fri, 6 Mar 1998 13:51:10 -0800 (PST)
- To: Sofie Johansson Kokkinakis <svesj@svenska.gu.se>
- cc: www-html@w3.org
On Fri, 27 Feb 1998, Sofie Johansson Kokkinakis wrote: > Since I started using frames I seem to have a problem with "cache" memory. > > When I activate a cgi-script from a form or a "<A HREF" link, I get no > new results, only the old results come up In CGI you can generate explicit HTTP headers to control cacheing, e.g. "Expires", "Cache-control", "Pragma", "Last-Modified". See the HTTP/1.0, HTTP/1.1 spec.s for details IMO one should try to generate as many headers as possible, i.e. valid Content-Length, Last-Modified, Expires with correct values, and if feasible handle If-Modified-Since requests. Setting "Pragma: no-cache" may (should?) result in the document not being cached. Setting "Expires: 0" will probably result in the document being cached, but an If-Modified-Since request being sent every time. Setting a valid GMT expiration time will result in the cached copy being used (depending on browser preferences) until the expiry date is passed, when an If-Modified-Since request will be sent (based on the Last-Modified date). If desperate, adding a junk query to the URL will guarantee a new document. (One should add Expires: 0 to prevent hierarchical cache wasting resources saving junk URLs) Andrew Daviel TRIUMF & Vancouver Webpages http://vancouver-webpages.com/CacheNow/ - campaign for proxy cache
Received on Friday, 6 March 1998 16:51:34 UTC