Solved

upload file caching problem

Posted on 2004-10-18
2
182 Views
Last Modified: 2010-04-01
the new upload picture file does not display until i refresh the page. I believe this is a caching problem. So i added the following statements to prevent browser caching. But it didn't work. Is this a caching problem or something else? If this is a caching problem, how can i solve it?

 <%
response.setHeader( "Cache-Control", "no-cache" );
response.setHeader( "Pragma", "no-cache" );
response.setIntHeader( "Expires", 0 );

%>
0
Comment
Question by:jeff1919
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
siliconeagle earned 250 total points
ID: 12348340
you can add a date to the end if the image url to prevent image caching e.g:-
<img src="img.gif?<%= (new Date()).getTime() %>" />

is it the old image you see, or just no image?
if it's no image have you closed the file after writing it, maybe the webserver cannot read the file as it's open for writing.
0
 
LVL 2

Expert Comment

by:siliconeagle
ID: 12349193
some more headers to try are:-


// always modified
response.setHeader( "Last-Modified",""+(new Date()));
 
// HTTP/1.1
response.setHeader( "Cache-Control","no-store, no-cache, must-revalidate");
response.setHeader("Cache-Control","post-check=0, pre-check=0");
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
Today’s effective marketing is about coming down to the customers’ level and engaging in a whole new way. A text message is one of the most effective and influential ways that you can engage your customers. Here are eight ways that you can utilize t…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question