For preventing pages from being cached downstream (for example with a logout page) in ASP.NET, you can set the "no-cache" header by using the HttpCachePolicy.SetNoStore method. Put this in your page_load at the latest. You can also set this in your
page's HEAD section by adding the following line of code:
pkellner
All-Star
24042 Points
3625 Posts
ASPInsiders
Moderator
MVP
Re: Prevent Caching Correctly?
Nov 17, 2006 09:31 PM|LINK
meanwhile, try this:
sounds like the browser is caching your image.
Peter B's got a good article on caching in general.
http://www.eggheadcafe.com/articles/20060407.asp
For preventing pages from being cached downstream (for example with a logout page) in ASP.NET, you can set the "no-cache" header by using the HttpCachePolicy.SetNoStore method. Put this in your page_load at the latest. You can also set this in your page's HEAD section by adding the following line of code:
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
http://peterkellner.net
Microsoft MVP • ASPInsider