Preventing caching of pages and referenced graphics
Hi Ron,
Please try the following and post back to let me know if it solved your
problem. My answer is in two parts.
Part 1)
Are you using Response.BinaryWrite to stream out your graphic? In that
case, try adding these to the stream.
<%
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1000000
%>
1) CacheControl tells all "modern" devices to not cache.
2) Expires tells all "modern" devices that the content is out-of-date (so
don't cache it).
3) Pragma tells many older devices to not cache.
"Devices" includes your server, the end user's browser, and any routers
inbetween.
PART 2)
If you have a tag in your page which points to the graphic, then you want
to set these headers for the graphic itself. This is done with IIS settings
using Internet Services Manager. In properties for the image file, on the
HTTP Headers tab, add the above headers manually.
--
Again, please let me know if this solves your problem.
Thank you, Mike Moore
Microsoft, ASP.NET
This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
microsoft.public.windows.inetexplorer.ie5.gen.disc ussion:8286
|