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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image Problem 2

Status
Not open for further replies.

angiem

MIS
Sep 29, 2000
116
CA
I have an asp page that loads a jpg file and displays it, if however you choose the wrong one and reload a new one the new image is not being shown it still shows the old one. The only thing that seems to work is either a manual refresh or by changing the IE settings of Check For new versions to each visit. I would like to know how I can get it to work properly.
 
dont cache the page...remove cache...

put these 3 lines on the top of your page:

<% Response.CacheControl = "no-cache" %>>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>

-DNG
 
I thought I had it working this morning, but it's not now. I seem to recall doing something with the IIS and it's http headers but don't know what
 
Try holding the shift key down when you click your Refresh button in IE. IE might be caching the page even if the server is not.


Stamp out, eliminate and abolish redundancy!
 
The Shift-Refresh was just to make certain you were working with a current copy of the page. If it had already been cached before making your changes then when you went to test your changes you would still see the old version of the page and think the changes did not work when in fact they might if they ever got loaded.

In some cases proxy servers will cache data. The first line DNG gave you above should prevent that but some proxy servers seem to ignore that setting. If that seems to be the case for you then you can always add a randomly generated string to your URL so it comes out like: Since the URL would always be unique the proxy would not be caching it.



Stamp out, eliminate and abolish redundancy!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top