Skip to content

Make sitemap.xml.gz slightly more reproducible#3460

Merged
oprypin merged 3 commits intomasterfrom
gz
Dec 8, 2023
Merged

Make sitemap.xml.gz slightly more reproducible#3460
oprypin merged 3 commits intomasterfrom
gz

Conversation

@oprypin
Copy link

@oprypin oprypin commented Nov 10, 2023

The gzip format stores a timestamp inside it, but there's no real point to it being correct.

If a site is rebuilt exactly the same twice, the timestamp metadata of files will be different sure, but this gzip file was the only one that also had actual content that is different each time.

Now instead the date of the gzip file will change only once per day, based on the pages' update date. The sitemap.xml itself also changes once per day already.

Oleh Prypin added 2 commits November 10, 2023 20:23
The gzip format stores a timestamp inside it, but there's no real point to it being correct.

If a site is rebuilt exactly the same twice, the timestamp *metadata* of files will be different sure, but this gzip file was the only one that also had *actual content* that is different each time.
@ultrabug
Copy link
Member

Don't you fear that setting a static metadata to a file could introduce unexpected behaviors from third party implementations?

On top of my head could be indexing robots that might look at it to update or not a sitemap and indexing but I don't know really, just sharing a thought.

@oprypin

This comment was marked as abuse.

@ultrabug
Copy link
Member

Since sometimes code is faster than words, I'd like to humbly propose another approach with #3468

If you like the idea, I can work on fixing tests and improving the code ofc

@oprypin

This comment was marked as abuse.

@oprypin

This comment was marked as abuse.

@oprypin

This comment was marked as abuse.

Copy link
Member

@ultrabug ultrabug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a nice bargain indeed

@giordano
Copy link

Are there plans to release a new version which includes this change? Avoid needless changes to the compressed archive in static websites maintained on github would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reproducible Builds

3 participants