Link to home
Start Free TrialLog in
Avatar of jeff1919
jeff1919

asked on

upload file caching problem

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 );

%>
ASKER CERTIFIED SOLUTION
Avatar of siliconeagle
siliconeagle

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of siliconeagle
siliconeagle

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");