Opened 3 years ago

Closed 3 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: 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.

Change History (7)

comment:1 Changed 3 years ago by Julian Bez

Needs documentation: unset
Needs tests: unset
Owner: changed from nobody to Julian Bez
Patch needs improvement: unset
Status: newassigned

comment:2 Changed 3 years ago by Claude Paroz

Needs tests: set
Triage Stage: UnreviewedAccepted

comment:3 Changed 3 years ago by Julian Bez

Needs tests: unset

comment:4 Changed 3 years ago by Claude Paroz

Triage Stage: AcceptedReady for checkin
Version: 1.5master

comment:5 Changed 3 years ago by Aymeric Augustin

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

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 3 years ago by Aymeric Augustin (previous) (diff)

comment:6 Changed 3 years ago by Julian Bez

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

comment:7 Changed 3 years ago by Tim Graham <timograham@…>

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