Skip to content

Add Site Health test to verify that static assets are served with far-future expires - #1727

Merged
westonruter merged 34 commits into
WordPress:trunkfrom
b1ink0:add/far-future-expiration-test
Jan 22, 2025
Merged

Add Site Health test to verify that static assets are served with far-future expires#1727
westonruter merged 34 commits into
WordPress:trunkfrom
b1ink0:add/far-future-expiration-test

Conversation

@b1ink0

@b1ink0 b1ink0 commented Dec 9, 2024

Copy link
Copy Markdown
Contributor

Summary

Fixes #323

Relevant technical choices

Test are based on the Cache-Control with max-age or an Expires to determine if the static assets are served with far future expires. If Cache-Control and Expires are unavailable then the ETag and Last-Modified are used to do a secondary request to the same asset URL with If-None-Match and If-Modified-Since, respectively. If those return with 304 Not Modified then that could pass the test as well.

screenshot

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

Labels

[Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Site Health test to verify that static assets are served with far-future expires

3 participants