Opened 11 years ago

Closed 11 years ago

#20793 closed New feature (fixed)

Add Last-Modified header to generated sitemaps

Reported by: Julian Bez Owned by: Julian Bez
Component: contrib.sitemaps Version: dev
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.

Change History (7)

comment:1 by Julian Bez, 11 years ago

Owner: changed from nobody to Julian Bez
Status: newassigned

comment:2 by Claude Paroz, 11 years ago

Needs tests: set
Triage Stage: UnreviewedAccepted

comment:3 by Julian Bez, 11 years ago

Needs tests: unset

comment:4 by Claude Paroz, 11 years ago

Triage Stage: AcceptedReady for checkin
Version: 1.5master

comment:5 by Aymeric Augustin, 11 years ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

The current patch will add a Last-Modified header if any item if 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.

Version 0, edited 11 years ago by Aymeric Augustin (next)

comment:6 by Julian Bez, 11 years ago

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

comment:7 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In 8f5533ab250df07ea84f98d39808806e282468a5:

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

Note: See TracTickets for help on using tickets.
Back to Top