tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Schönhaber <mailing-tomcat-u...@schoenhaber.de>
Subject Re: HTTP 304 - IF_MODIFIED_SINCE
Date Tue, 05 Sep 2006 12:42:41 GMT
ben short wrote:
> Im using Tomcat 5.5.17. I assumed that my browser would send the
> If-Modified-Since Request-Header and have tried your jsp page and it
> does.

OK, this shows three things:
1. It's much less helpful to assume things than to find out for sure. If 
you're interested in the exact request your browser generates, there are a 
couple of ways get that information. For example: the LiveHTTPHeaders 
extension for firefox, something similar for IE, tools like Wireshark (The 
Application Formerly Known As Ethereal), the HTTP monitors NetBeans and the 
WTP for eclipse provide.
2. The JSP I posted causes Firefox and IE to send If-Modified-Since headers on 
the second request.
3. The answer to your original question "How do I access the If-Modified-Since 
header field" is "like you would do for any other header field".

OTOH, from what you write about your servlet, I get the impression that your 
real problem is the following: "How do I avoid to serve ressources again 
which haven't changed since the last time the client accessed them?".
If you want to decide whether or not the client has already requested the 
actual version of the ressource by using the If-Modified-Since header field, 
you'll have to find out what causes the clients to send such a header in the 
first place. RFC 2616 might provide some hints.

Regards
  mks

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message