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

Speculation rules: target_hint field #931

Closed
1 task done
nhiroki opened this issue Feb 13, 2024 · 8 comments
Closed
1 task done

Speculation rules: target_hint field #931

nhiroki opened this issue Feb 13, 2024 · 8 comments

Comments

@nhiroki
Copy link

nhiroki commented Feb 13, 2024

こんにちは TAG-さん!

I'm requesting a TAG review of target_hint field for speculation rules prerendering.

This extends speculation rules syntax to allow developers to specify the target_hint field.

This field provides a hint to indicate a target navigable where a prerendered page will eventually be activated. For example, when _blank is specified as a hint, a prerendered page can be activated for a navigable opened by window.open(). The field has no effect on prefetching.

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • Relevant time constraints or deadlines: We hope to start an origin trial with partners as soon as possible, so the sooner, the better.
  • The group where the work on this specification is currently being done: WICG
  • The group where standardization of this work is intended to be done (if current group is a community group or other incubation venue): WHATWG
  • Major unresolved issues with or opposition to this specification: n/a
  • This work is being funded by: Google

You should also know that...

n/a

We'd prefer the TAG provide feedback as (please delete all but the desired option):

☂️ open a single issue in our GitHub repo for the entire review

@torgo
Copy link
Member

torgo commented May 22, 2024

We're just taking a look at this today and noting that the section of the explainer doc you've linked to doesn't have explicit user needs indicated. Can you add something that indicates the user need you're trying to service here? I think it's something like "enhance the efficiency of pre-rendering so if the user's device does that pre-rendering work it's more likely to be used and therefore the user is more likely to have a performant experience" - is that correct?

@matatk
Copy link

matatk commented May 22, 2024

Also, the explainer mentions the desire to deprecate this, when the engineering work is done. I appreciate it's hard to predict how the work will go, but is there any way to firm up the timeline in the explainer, or for the public to track when it's complete?

@plinss plinss removed this from the 2024-05-27-week milestone Jun 10, 2024
@torgo torgo added this to the 2024-06-17-week:c milestone Jun 16, 2024
@matatk matatk added the Progress: pending external feedback The TAG is waiting on response to comments/questions asked by the TAG during the review label Jun 26, 2024
@plinss plinss removed this from the 2024-07-29-week milestone Aug 5, 2024
@torgo torgo added this to the 2024-08-19-week milestone Aug 8, 2024
@plinss
Copy link
Member

plinss commented Aug 19, 2024

@nhiroki any updates to the above questions?

@nhiroki
Copy link
Author

nhiroki commented Aug 21, 2024

Sorry for my late action. @robertlin-chromium is now updating the explainer.

@domenic
Copy link
Member

domenic commented Aug 22, 2024

The updates have been merged in WICG/nav-speculation@d8ce9b5.

@jyasskin
Copy link
Contributor

jyasskin commented Sep 9, 2024

For our background:

  1. https://github.com/WICG/nav-speculation/pull/173/files#diff-086d7831ccea2721156a3a66a719f58f0eb0501d4b0da344f07e7a0df46a3efeR151, saying it would take a year or so of engineering effort to remove the need for this field, was merged about 2 years ago. Is there an updated estimate for how long this field will be around? I see that https://issues.chromium.org/361129302 exists to track progress on this effort, but it doesn't have that estimate.
  2. Have you gotten any indications from Gecko or WebKit (even though they haven't supported prerendering itself) about whether they'd have the same implementation constraint that benefits from this field? Does this field affect Mozilla's argument against the JSON syntax? Without having deeply investigated it, this field might support their argument to put rel="nav-prerender" on <a> tags since those already have the target attribute.

FWIW, after skimming the description, it seems like this is designed well, so that it can fade away once it's no longer needed, and that it doesn't add much complexity.

@jeremyroman
Copy link

Without stepping on @nhiroki's toes, the document rule syntax does allow selecting links in the page, and when that is done, the target attribute is indeed implicitly used.

@jyasskin
Copy link
Contributor

Thanks for explaining that this does re-use the <a target> attribute when that's available, and sorry for missing it in my review. We discussed this in our breakout session yesterday:

Please keep working with Mozilla to figure out the right consensus syntax for this. Beyond that, we don't see any architectural issues and (ignoring any worries about the underlying feature) are satisfied with this extension. Thanks for sending this review!

@jyasskin jyasskin added Progress: review complete Resolution: satisfied The TAG is satisfied with this design and removed Progress: pending external feedback The TAG is waiting on response to comments/questions asked by the TAG during the review labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment