aspose file tools*
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 Spring in Action this week in the Spring 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: 579
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: 178

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: 579
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: In the HttpServletResponse header what does expire date mean