Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Servlets
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Liutauras Vilda
Paul Clapham
Sheriffs:
paul wheaton
Tim Cooke
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Piet Souris
Bartenders:
Mike London
Forum:
Servlets
In the HttpServletResponse header what does expire date mean
Tony Evans
Ranch Hand
Posts: 681
1
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am going to write a last-modified header onto a file
HttpServletResponse resp = (HttpServletResponse) response; resp.setHeader("Expires", "Tue, 03 Jul 2001 06:00:00 GMT"); resp.setHeader("Last-Modified", new Date().toString()); resp.setHeader("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0"); resp.setHeader("Pragma", "no-cache");
Found this example, understand all it apart from the Expires, just need to know the significance of the date, so I know what date to set.
Thanks for any Help
German Gonzalez-Morris
Ranch Hand
Posts: 374
2
I like...
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Those are HTTP headers therefore you must look in the HTTP specification:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
"The Expires entity-header field gives the date/time after which the response is considered stale"
http://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Expires
Cheers,
http://devwebcl.blogspot.com/
Tony Evans
Ranch Hand
Posts: 681
1
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Gonzalez-Morris that makes sense so if the date is set in the past the data will always be stale an so every time a file with that header is accesed it will be the latest an not the cache file.
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Display PDF in IE from byte array using Servlet
Display byte array of PDF in browser
Problem with session
Can't get ImageIcon to show up from captcha
Browser Caching strategies
More...