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

Problems with images loading from cache.

Status
Not open for further replies.

wjisback

Programmer
Dec 20, 2003
2
US
I have a webpage that uploads1 to 7 images using persits.upload. In the process I rename them xx(1).jpg, xx(2).jpg, etc. In some cases the images have to be reordered where I change the (1) to a (6) and the (6) to a (1) or any other combination.
This works fine and the images on the server are reordered but when the page relodas the new image (6) moves to the (1) spot but the old image (6) loads from the cache. In effect, I now have two identical images, 1 named xx(1).jpg and the other named xx(6).jpg. I can flush the cache and it will then reload from the server and everything will be correct, or in the right order. Just using refresh will not work.
I'm prograing is asp. Does anyone know a comand that will not allow the page to load from the cache?
Ive tried the following but it does not work.
<%
Response.Expires = -1%
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>
Thanks, wjisback@tds.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top