?
Solved

upload file caching problem

Posted on 2004-10-18
2
Medium Priority
?
183 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 1000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

762 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