tunetheweb
Forum Replies Created
-
Forum: Plugins
In reply to: [Speculative Loading] 404 errors in Google Search Console – related?Correct. It’s like a very primitive preload scanner.
This is easily shown btw. Add something like above (maybe something even more unique) and within a few hours you’ll see GoogleBot crawling it in your web server logs.
Apparently it causes no problems as failures are almost expected with this. But it does create noise in GSC.
Forum: Plugins
In reply to: [Speculative Loading] 404 errors in Google Search Console – related?I don’t think this is related to 6.9, as I’ve heard of this happening before. I followed up with the Search team and they confirmed they will attempt to fetch things that look like a URL, including these things in Speculation Rules JSON syntax. They have no plans to change this that I’m aware of and say the 404s can be ignored.
I know of one plugin that moved from inline Speculation Rules in the HTML, and instead moved to a JSON file, referenced with an HTTP header because of this. See here: https://developer.chrome.com/docs/web-platform/prerender-pages#speculation-rules-http-header
Maybe that’s something this plugin and/or WordPress core should consider?Forum: Plugins
In reply to: [Speculative Loading] Lighthouse crashes with Speculative Loading enabledFYI, I think this will be fixed in the next version of Lighthouse (12.6?) and which should be included in Chrome 137:
https://github.com/GoogleChrome/lighthouse/pull/16451Forum: Plugins
In reply to: [Speculative Loading] FireFox?Firefox supports the older
<link rel="prefetch">resource hint, but not the newer Speculation Rules API. The new API includes many benefits over<link rel="prefetch">including:- Full prerender as well as prefetch
- Automatic link finding
- Different eagerness levels
- Better DevTools support
- More consistent behaviour (particular with cross-origin prefetching/prerendering).
It is no longer recommended to use
<link rel=prefetch>for navigation prefetches, and instead to use the new Speculation Rules API for this, and to only use<link rel=prefetch>for subresources.However, we have asked Firefox’s position on this new API and they are positive on it, so hopefully that means support will come to Firefox at some point, at which point this plugin should support it.
Forum: Plugins
In reply to: [Speculative Loading] Is Your Plugin Compatible with Instant Page?For both questions I would suggest reading this post (full disclosure—I wrote it!):
I’m not sure what settings you’re using, but prefetches (for both plugins) should be available in the network tab of DevTools )as detailed in the post). Double check both are working as per the given settings and not double fetching the same resource twice.
If using prerender you need to use the dedicated panels in the DevTools Application panel to debug and ensure it’s working as expected.
Also, if you can share the site, then I can have a look to see if I can spot anything weird about the combo of both plugins.
Forum: Plugins
In reply to: [Speculative Loading] Is Your Plugin Compatible with Instant Page?You tomato, I say tomato…
Forum: Plugins
In reply to: [Speculative Loading] Is Your Plugin Compatible with Instant Page?Instant.page also merged support for Speculation Rules earlier this year (See this PR), though haven’t yet released a version including that addition. In theory that would give the best of both worlds, but with the addition of a bit of JavaScript to detect and use them both.
The Speculative Loading plugin is JS free, but only supports this API.
So advantages of this plugin:- JS-free so a lighter implementation.
- Several WordPress-specific guards implemented (e.g. don’t speculate admin pages, or WooCommerce links..etc.)
- Being actively maintained – two maintainers answering questions on a Sunday night for example 🙂
- Allows full prerender for even faster loads.
- Allow prefetch into memory, which has some benefits.
However, disadvantages of this plugin:
- No fallback for unsupporting browsers (like Firefox and Safari).
Forum: Plugins
In reply to: [Speculative Loading] What’s the difference with Flying PagesBTW, even though speculation rules is only supported in Chromium browser, the
<link rel=prefetch>that the Flying Pages plugin uses is not supported in Safari so neither will work for Safari (there is mention in the code of falling back to XHR but it looks like this was removed).So by choosing the Speculative Loading plugin over Flying Pages you’re not speeding up Firefox users (as Firefox does support
<link rel=prefetch>but not Speculation Rules), which is indeed a shame, but you need to weigh that up with the simple native API (not requiring JavaScript) and the potential bigger improvements available through prerendering. Personally, as this is a progressive enhancement (i.e. nothing breaks for those Firefox users, it’s just not sped up), I’d prefer Speculation Rules. But I worked on this feature so I’m biased 😀I compare it to the Lazy Loading JavaScript libraries that have been largely surpassed by using the native
loading=lazyfunctionality. Sure the libraries give you more options, and some functionality for non-supporting browsers but the native solution is lighter and often good enough (especially as that one is now supported in all browsers).Perhaps Flying Pigs will be enhanced to also support Speculation Rules, and fallback for Firefox and further fallback for Safari but it looks to me like there hasn’t been a release since 2020 so I guess it’s no longer being actively developed. Other plugins may take that route for a fully support picture, but again at the cost of more complexity. So need to decide whether a fully (but larger and more complex) plugin is worth it to you.
Forum: Plugins
In reply to: [Speculative Loading] Does it conflict with Cloudflare’s Speed Brain?Btw we are looking to enhance the underlying Speculation Rules API to allow Cloudflare to differentiate between their own rules (and block if not cache) and rules added to the site separately (and allow them through as the site owner had requested them).
Once we do that you won’t need to turn off the SpeedBrain setting. But for now it’s best to turn it off if using this plugin.
Forum: Plugins
In reply to: [Speculative Loading] Does it conflict with Cloudflare’s Speed Brain?At the moment yes it does conflict a little yes.
Cloudflare’s SpeedBrain product only allows cached responses to be speculated when it is enabled. This was a safety check they put in to prevent overloading origin servers or speculating unsafe pages since they enabled it by default.
This means you might see less speculations as uncached responses (arguably the ones that benefit the most from this!) will be blocked.
However, for cached responses it will work the same. So they are compatible in that sense.
We recommend disabling SpeedBrain if you have an explicit, better, set of rules enabled at a site level. Like this plugin does for you.
Forum: Plugins
In reply to: [Speculative Loading] Issue on MS Edge BrowserWe’ve managed to replicate it. You can follow along at this bug: https://issues.chromium.org/issues/365490302
Will update this thread also when we have a resolution…
Forum: Plugins
In reply to: [Speculative Loading] Exclude a specific CSS fileCorrect. The other alternative is to use prefetch rather than prerender.
Forum: Plugins
In reply to: [Speculative Loading] Exclude a specific CSS fileYou would need to use a technique like this: https://developer.chrome.com/docs/web-platform/prerender-pages#hold-back-other-content
This example is for a script tag, but the same technique could be used for a
<link rel=stylesheet>tag.Forum: Plugins
In reply to: [Speculative Loading] a[rel=nofollow] exact match only?Oh good spot. Fixed in https://github.com/WordPress/performance/pull/1232 which should be included in the next release.
Forum: Reviews
In reply to: [Speculative Loading] Excellent performance boostThanks for the feedback!
Btw default Lighthouse scores won’t change as this works on links between pages whereas Lighthouse by default only does a cold page load. It is possible to use the Lighthouse user-flow functionality to measure across page loads (where this functionality shines) but that will be quite different to the usual page load you may be used to anyway.