• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

If-Modified-Since ??

 
R K Singh
Ranch Hand
Posts: 5384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If-Modified-Since is the header send by http-Client, which is in turn checked against getLastModified() method of servlet.
My question is that how can we set *If-Modified-Since* header, is it automatically set by Servlet engine when we implement getLastModified() or we are suppose to set explicitly by settinng header?
I tried to serach in this Forum but ...
TIA
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't been able to find the If-Modified-Since
header information, but if I put my 2 cents I would say this is something implemented by the container, meaning they ahndle this header to see if they need to load in the new version of the servlet since it has changed. You might be able to set it, but you set headers in the response, so I don't know what use it would be to the client side.
I could be wrong
Mark
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go over to the "w3c" site and look at the HTTP 1.1 specs.
I did, thinking I would come away enlightened.
The reality is, I am more muddled .....
Regards, Guy
 
Meng Tan
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
From my understanding, if getLastModified() method is overridden then the server will send a "Last-Modified" header to the client. The header will contain the value returned by getLastModified(). The browser will then send a "If-Modified-Since" header in its subsequent requests to the server.
So, the "Last-Modified" header is automatically set by the server.
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic