Anil Gangolli wrote:

Adding an "Expires" header in the past solves this. The browser will revalidate its cache. Both IE and Firefox send the If-Modified-Since header and either get the Not Modified response or hit the server-side cache.

I have never really used the Expires header, but are we sure that's the right approach? It sounds like that is somewhat falsely indicating that the content has Expired, so I would think that its possible that some browsers might consider that an indication that it doesn't need to bother with doing the If-Modified-Since check.


I plan to commit changes that set the Expires header in each place that we currently set the Last-Modified header. There are calls in about 8 places. I think we need to localize this better.

There is other minor messiness to clean up here too. The millisecond truncation issue is handled in two different ways. In one place (PlanetFeedServlet) the code adds 1000 to the millisecond value before setting the header, effectively rounding up while setting the header. In most other places it truncates down before comparing; but, it is only using this logic for the site-wide case. It should use it for individual blogs as well.

I'm not sure why the millisecond precision error is handled differently in the PlanetFeedServlet case, but the reason we don't make that adjustment for individual blogs is because it's not needed. Because the lastModified date for weblogs comes directly from the db I found that the precision that I got on the Date which was loaded from the db was already truncated.

So it seems that only the original Date object initialized by the jvm is capable of that extra precision, and if the Date is ever saved/loaded from the db or set/get from the http headers then the truncation happens. So that's why we aren't adjusting the precision of the Date for individual weblogs.

-- Allen


I'll hope to do some cleanup in a separate checkin later.

--a.



----- Original Message ----- From: "Anil Gangolli" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, September 05, 2006 8:02 AM
Subject: Re: problems with 3.0 on IE


I am going to try sending a combination of Expires and Last-Modified and see if this can induce IE both to send subsequent requests and to include the If-Modified-Since header. (Will test with Firefox as well). Based on my reading of the spec, this should work.


Reply via email to