-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add an additional action - preparse (aka NSP) #305
Comments
(In fact Chromium actually still has some code to support Lots of interesting questions to evaluate how useful this is (e.g., how large are the subresources that are not already in cache, assuming we're doing this same-origin; would we want to support this cross-origin or not). On the spec side, probably the most interesting piece here would be formalizing more about how preloaded subresources are found (somewhere there is discussion on a GitHub issue about invoking the HTML parser in a way that will scan through |
Huge +1 to this one as we're facing similar challenges on our platform when it comes to Speculation Rules. We want to roll them out to everyone in a safe and impactful way. Unfortunately, the less conservative we get the higher the risk that we'll break merchants' scripts and analytics. Realistically speaking, I don't think we'll ever be able to do Our TTFB is quite good, so using My idea was that it could "just trigger" the preload scanner over the HTML response. For us this should be enough to make sure all of the critical resources are already in the cache. |
Thanks very much for the comment @krzksz. Hearing that a large platform would be willing to use this definitely ups the priority. We currently have an old implementation behind a flag: you can test it by passing
Given these limitations, I think it would be pretty frustrating to try even behind a flag. But I think we could work on some basic DevTools support and fixing of the above unexpected limitations during Q3 to get ready for a Dev Trial or Origin Trial, if Shopify's interested in experimenting!
Keep in mind that |
Thanks for the overview @domenic! The
Noted! What I'm trying to say is that with our TTFB there seems to enough time for the browser to do more then just
We're currently restarting the work on rolling out Speculation Rules after we had to pause it last year because of some browser bugs. It's a bit early for us to commit to anything I think, but I'll @yoavweiss chime in as well. He's championing the project this time. |
We propose to add a third action called “preparse” (open for alternative names). Like prerendering, it fetches resources in advance; but unlike prerendering it does not execute JavaScript or render any part of the page in advance. (an action similar to No State Prefetch (NSP) in Chromium)
This new third action allows for more performance gains than a simple prefetch and would be a significant risk reduction compared to a full prerender (due to 1st party and 3rd party JS execution)
We have found that some of our customers are reluctant to enable Speculation Rules because the risk to their application of enabling pre-rendering is too great
Here are 3 (related) statements:
Existing alternatives with 2 different actions are suboptimal:
This new action also allows for progressive speculation rules, where the result of an eagerly triggered action (a lot of time) can be used for the less eager action.
Thank you for considering this option
The text was updated successfully, but these errors were encountered: