File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Setting response page expire time Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Setting response page expire time" Watch "Setting response page expire time" New topic
Author

Setting response page expire time

pravin rane
Greenhorn

Joined: Nov 07, 2005
Posts: 6
hi all,
i wanted to set the page expiry time such that for each request the client
browser request server to retrieve the page (now it returns the page which is cached by the browser). i wanted to force client browser to request the
server for each and every request page.

will you please let me know how to do this

thanks in advance.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
By setting an appropriate header on the response, you can instruct the browser not to cache the response.

response.setHeader("Cache-Control", "no-cache")
response.setHeader("Pragma", "no-cache")


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Setting response page expire time
 
Similar Threads
About Server/client Application
Why keep aive connection
help required
write object to http-request
cache in jsp