Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Speculative Loading by default when the user is logged-in or no-cache headers are sent #1709

Closed
westonruter opened this issue Nov 29, 2024 · 4 comments
Labels
[Plugin] Speculative Loading Issues for the Speculative Loading plugin (formerly Speculation Rules) [Type] Enhancement A suggestion for improvement of an existing feature

Comments

@westonruter
Copy link
Member

As first mentioned in #1692 (comment), Chrome is going to be removing the five-minute rule for <link rel=prefetch>. This means Speculative Loading will no longer work on pages when a user is logged-in since in this case WordPress sends a Cache-Control response header with no-cache, must-revalidate, max-age=0, no-store, private.

Speculative Loading should also be disabled if a page was served with nocache_headers() having been called.

Without these changes, there is a risk that a site may be attempting to prefetch pages only to have them discarded due to the Cache-Control response header. This would needlessly add server load without any user benefit.

A Site Health test for a site unconditionally sending the nocache_headers() would also make sense which is captured in #1692. This is relevant not only for Speculative Loading but also for bfcache.

@westonruter westonruter added [Plugin] Speculative Loading Issues for the Speculative Loading plugin (formerly Speculation Rules) [Type] Enhancement A suggestion for improvement of an existing feature labels Nov 29, 2024
@westonruter westonruter added this to the speculation-rules n.e.x.t milestone Nov 29, 2024
@github-project-automation github-project-automation bot moved this to Not Started/Backlog 📆 in WP Performance 2024 Nov 29, 2024
@westonruter
Copy link
Member Author

cc @felixarntz

@westonruter
Copy link
Member Author

@tunetheweb has this been on your radar?

@tunetheweb
Copy link
Contributor

Awaiting 100% confirmation from the Tokyo team but my understanding is this doesn’t affect Speculation Rules.

@tunetheweb
Copy link
Contributor

Confirmed this will not affect Speculation Rules for the reasons given here.

So think we can close this @westonruter ?

@westonruter westonruter closed this as not planned Won't fix, can't repro, duplicate, stale Dec 4, 2024
@github-project-automation github-project-automation bot moved this from Not Started/Backlog 📆 to Done 😃 in WP Performance 2024 Dec 4, 2024
@westonruter westonruter removed this from the speculation-rules n.e.x.t milestone Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Speculative Loading Issues for the Speculative Loading plugin (formerly Speculation Rules) [Type] Enhancement A suggestion for improvement of an existing feature
Projects
Status: Done 😃
Development

No branches or pull requests

2 participants