RE: how to force browser not to cache image

by Thomas James Allen <tjallen(at)pipeline.com>

 Date:  Sat, 04 Sep 1999 13:06:48 -0400
 To:  <Gary(at)BonhamDesigns.com>
 Cc:  hwg-basics(at)hwg.org
  todo: View Thread, Original
At 10:57 PM 9/3/99 -0700, you wrote:
>I tried this a week ago and it didn't seem to work. Any comments?
>Gary
>> ------Gary is writing about this:
>>
>> <META Http-Equiv="Pragma" Content="no-cache">
---------------------------------

Gary,
According to w3c, it is "supposed" to work, but not all
browser manufacturers comply with w3c directives. See:
http://www.w3.org/Protocols/HTTP/1.1/spec.html#Pragma

Another way to do it is to use "max age" and put one second in there,
but it seems not all browsers follow this one, either. See:
http://www.w3.org/Protocols/HTTP/1.1/spec.html#Cache-Control

Another way is to use "expires", but this is IE only,
to quote the HomeSite help files: 
-----(quote)--------
Internet Explorer supports a mechanism known as pragma no-cache, using the
<META> element to prevent pages from being cached by the browser. Using this
method, you can prevent the page that contains the HTML from being cached by
the browser, ensuring that the most recent version of the page is always
seen by the user. This is especially useful for pages that may be
dynamically created (for instance, search query results, or database
searches). To take advantage of this mechanism, use the EXPIRES keyword,
together with a date that has already past. For example : 
<META HTTP-EQUIV="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT"> 
In this case, the browser will be made to believe that the document expired
on the 6th January 1990 and so, will not cache the page. 
-------(end of quote)---------

Maybe some combination of these methods will work for most browsers.
That's all I know about it, but I hope others will publicly respond to
this, as I need to know the answer, too!

Hope this helps,
jimmy

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA