• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to remove browser cache after updating Jsp page on server

 
rachit mehra
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 665
4
Eclipse IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try the Last-Modified header.
 
rachit mehra
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic