The problem is as follows: 1) Bonsai sends a last-modified header and no expires header 2) Per HTTP spec, expires is computed by the client in this circumstance 3) The algorithm Mozilla uses (the one recommended by the HTTP spec) is: now + max(Ceiling, 1/10 * (now - last_modified)) This means that pages that have not been touched for a while get an expires time way in the future. Now the problem is that when Mozilla is set to check pages "when out of date" (the default setting, and the most sane one in general), it checks the current date against expires and only requests the current last-modified header if the page is expired. Which means that once it's cached one of these "not touched in a bit" bonsai pages it will be months before it actually checks whether the page has been updated. This makes bonsai completely unreliable. The solution is either to send an expires header with a past date (to force checks back to the server) or better to send on with the date of the next scheduled update (if the updates are done via cron or something). Or to stop sending last-modified.
> now + max(Ceiling, 1/10 * (now - last_modified)) I meant min(), of course.....
See bug 233968 comment 2. I would say a 15-20 minute expiration would be about right for bonsai....
Attachment #141562 - Flags: review?(bbaetz) → review?(kiko)
Comment on attachment 141562 [details] [diff] [review] send expires (now+2hours) Code looks correct; adjust the times to what bz suggests before checking in.
Attachment #141562 - Flags: review?(kiko) → review+
The real solution would probably using a marker in the database or a user-configurable timing, of course..
Status: ASSIGNED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.