aspose file tools*
The moose likes JSP and the fly likes How  to remove browser cache after updating Jsp page on server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How  to remove browser cache after updating Jsp page on server" Watch "How  to remove browser cache after updating Jsp page on server" New topic
Author

How to remove browser cache after updating Jsp page on server

rachit mehra
Greenhorn

Joined: Jul 06, 2011
Posts: 13
How to remove browser cache when JSP page has modified on server side.

i used <% response.setHeader("Cache-Control","no-cache"); but it remove the page from cache every time we access the page.

i want only remove the Browser cache when JSP pages have been modified on server side otherwise JSP pages store on Browser cache.
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 594
    
    3

when server side code is modified, server should remove which browser's cache? (How it will come to know, which browser's users will use). I don't know any way, to clear browser cache from server. I doubt if its possible too, except when the page is loaded on a browser.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19791
    
  20

You could try the Last-Modified header.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
rachit mehra
Greenhorn

Joined: Jul 06, 2011
Posts: 13
when client send request to the server for a page then it cached in to the browser cache, when its is modified from server side it might be possible that when we again send request to this page on server it can take the content of the page from the browser cache .Is it possible to remove the cache only when the jsp page is modified on server side?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to remove browser cache after updating Jsp page on server