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

Images & Caching

Status
Not open for further replies.

pete321

Technical User
Feb 18, 2004
4
US
i have a pop-up window where users load images.

The first time a user loads an image, the window correctly displays the image. However, when the user uploads another image in the same window (thus replacing the original image), the new image does not get displayed.

i know this is caching problem, but don't know how to get around it. is there a way i can load the new image without having to refresh the pop-up window?
 
Is this on your own web server or on a hosted system?

If the former, the best solution might be to set up content-expiration on your web server.

If the latter, you might try sending content-expiration and cache-control directives in HTTP headers when you send the images. You'll need to send headers like:

Expires: <expiration time of now>
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache

where "<expiration time of now>" would be in the form "Thu, 19 Nov 1981 08:52:00 GMT"



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top