Bonsai showing stale pages

RESOLVED FIXED

Status

Webtools Graveyard
Bonsai
RESOLVED FIXED
15 years ago
2 years ago

People

(Reporter: bz, Assigned: timeless)

Tracking

Details

Attachments

(1 attachment)

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.....

(Assignee)

Updated

15 years ago
Assignee: tara → timeless
Depends on: 176316
(Assignee)

Comment 2

15 years ago
Created attachment 141562 [details] [diff] [review]
send expires (now+2hours)
(Assignee)

Updated

15 years ago
Attachment #141562 - Flags: review?(bbaetz)
(Assignee)

Updated

15 years ago
Status: NEW → ASSIGNED
See bug 233968 comment 2.  I would say a 15-20 minute expiration would be about
right for bonsai....
(Assignee)

Updated

15 years ago
Attachment #141562 - Flags: review?(bbaetz) → review?(kiko)

Comment 4

15 years ago
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+

Comment 5

15 years ago
The real solution would probably using a marker in the database or a
user-configurable timing,  of course..
(Assignee)

Updated

15 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.