This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Servlets and the fly likes In the HttpServletResponse header what does expire date mean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "In the HttpServletResponse header what does expire date mean" Watch "In the HttpServletResponse header what does expire date mean" New topic
Author

In the HttpServletResponse header what does expire date mean

Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 588
I am going to write a last-modified header onto a file




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

Joined: Nov 16, 2009
Posts: 218

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

Joined: Jun 29, 2002
Posts: 588
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.
 
Have you checked out Aspose?
 
subject: In the HttpServletResponse header what does expire date mean
 
It's not a secret anymore!