Disable Speculative Loading by default when the user is logged-in or no-cache headers are sent #1709
Labels
[Plugin] Speculative Loading
Issues for the Speculative Loading plugin (formerly Speculation Rules)
[Type] Enhancement
A suggestion for improvement of an existing feature
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 aCache-Control
response header withno-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.The text was updated successfully, but these errors were encountered: