Edgewall Software

Ticket #4022 (new defect)

Opened 2 years ago

Last modified 8 months ago

Provide Etag and/or Last-Modified HTTP headers to ease cache control

Reported by: Giuseppe Bilotta <giuseppe.bilotta@…> Owned by: cboos
Priority: normal Milestone: 0.11-retriage
Component: wiki system Version: 0.10
Severity: normal Keywords: verify
Cc: giuseppe.bilotta@…, betatim+trac@…, brad@…, rick@…, vslavik@…

Description

Trac serves pages without any Etag or Last-Modified header, which makes cache management rather troublesome, and increases the server load. This is particularly important for RSS feeds, which might be checked relatively often.

(In one of the comments for #663 it was mentioned that conditional GET was planned for 0.9, but one of Trac setups I'm checking on is based on 0.10 and the functionality seems to be missing.)

I think most pages could be served with a Last-Modified header containing the date of the last change (for wiki and ticket pages) or the date of the most recent thing changed (for RSS feeds).

Attachments

Change History

Changed 2 years ago by mark@…

I second this one.

It would also help if these headers wouldn't be send (which is with 0.10 the case):

Cache-Control: must-revalidate
Expires: Fri, 01 Jan 1999 00:00:00 GMT

Changed 2 years ago by Giuseppe Bilotta <giuseppe.bilotta@…>

  • cc giuseppe.bilotta@… added

Changed 2 years ago by betatim

  • cc betatim+trac@… added

it should be trivial todo for the wiki

after line 135 in source:/trunk/trac/wiki/web_ui.py add

req.check_modified(page.time)

this only sends a etag for pages without a query part, except for ?format options, not quite sure how to handle those. maybe

req.check_modified(page.time, format)

is a better idea. sorry for not diffing.

Changed 21 months ago by cboos

  • owner changed from jonas to cboos
  • type changed from enhancement to defect
  • component changed from general to wiki
  • milestone set to 0.11

Seems like the check_modified is gone from the wiki web_ui, need to check this.

Changed 21 months ago by Brad Anderson <brad@…>

  • cc brad@… added

Changed 20 months ago by cboos

  • keywords verify added

Changed 11 months ago by Rick van der Zwet <rick@…>

  • cc rick@… added

Changed 8 months ago by vslavik@…

  • cc vslavik@… added

Add/Change #4022 (Provide Etag and/or Last-Modified HTTP headers to ease cache control)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from cboos. Next status will be 'new'
The owner will change from cboos to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.