-
Notifications
You must be signed in to change notification settings - Fork 101
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
Kick off speculative preload/prerender when searching #1291
Comments
So the problem is that Speculation Rules is really only for safe, idempotent, requests (i.e. simple links that make GET requests). Forms, by their very nature usually aren't guaranteed to be see (even if they result in GET requests that should in theory be idempotent). So currently the speculation rules API doesn't activate a prerender page even if it matches a Now the original poster from the above tweet (Tim) gets around this with a little bit of cleverness by utilising prerender, even if he doesn't directly use that:
So it's a fast load, even if not an instant one. However, this depends on the Search Results page being cacheable (at least for a short period) so the earlier prerender isn't completely wasted and is resuable from the HTTP Cache. And in my experience a lot of WordPress sites don't make the HTML document cacheable 😔 For a prefetch or prerender that's used directly that's OK as the Speculation Rules API specifically allows non-cacheable resources to be speculation. But for an indirect usage, which is basically just prefilling the HTTP cache for you, this is not OK. WDYT? Am I being overly pessimistic or does this mean we potentially can't enhance the plugin to do this? |
@tunetheweb I got instant loading working: #1297 As noted there:
|
Agreed. Raised this: WICG/nav-speculation#322 Also as noted in the PR I think you'll need to use |
@tunetheweb Why would that be needed? It's not navigating via |
Ah ignore me then. Been a while since I use this to update a URL! :-) |
Feature Description
See https://x.com/tunetheweb/status/1800104005873655924 from @tunetheweb
The text was updated successfully, but these errors were encountered: