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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 507

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.


Regards, Prasad
SCJP 5 (93%)
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

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
 
Similar Threads
Cacheing problem in JSP's
Browser cache
image in JSP page
After Logout still keeping session
How to set 'If-Modified-Since ' header