Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

In the HttpServletResponse header what does expire date mean

 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 265
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic