Code

Opened 9 months ago

Closed 9 months ago

#20793 closed New feature (fixed)

Add Last-Modified header to generated sitemaps

Reported by: julianb Owned by: julianb
Component: contrib.sitemaps Version: master
Severity: Normal Keywords: sitemaps last modified
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

From each items lastmod attribute, we can infer the lastmod of the whole sitemap and set this as Last-Modified header for the sitemap. Google will then request with an If-Modified-Since header and bytes are saved.

Attachments (0)

Change History (7)

comment:1 Changed 9 months ago by julianb

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to julianb
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 9 months ago by claudep

  • Needs tests set
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 9 months ago by julianb

  • Needs tests unset

comment:4 Changed 9 months ago by claudep

  • Triage Stage changed from Accepted to Ready for checkin
  • Version changed from 1.5 to master

comment:5 Changed 9 months ago by aaugustin

  • Patch needs improvement set
  • Triage Stage changed from Ready for checkin to Accepted

The current patch will add a Last-Modified header if any item in the feed has a lastmod.

I would expect it to add the header only if all items have a lastmod.

As soon as one item doesn't have a lastmod you really can't say anything about the entire feed.

Last edited 9 months ago by aaugustin (previous) (diff)

comment:6 Changed 9 months ago by julianb

I added a fix for this case. It now keeps track if all items have a lastmod.

comment:7 Changed 9 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 8f5533ab250df07ea84f98d39808806e282468a5:

Fixed #20793 -- Added Last-Modified header to sitemaps.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.