• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

If-Modified-Since ??

 
Ranch Hand
Posts: 5390
1
Spring Java
  • 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
 
ranger
Posts: 17346
11
Mac IntelliJ IDE 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
 
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
 
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.
 
keep an eye out for scorpions and black widows. But the tiny ads are safe.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic