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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
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: 1510
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://aspose.com/file-tools
 
subject: Setting response page expire time
 
Similar Threads
About Server/client Application
write object to http-request
Why keep aive connection
help required
cache in jsp