Skip to content

Add docs for Speculation Rules features: target_hint and clear-site-data #39652

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

Merged

Conversation

tunetheweb
Copy link
Contributor

@tunetheweb tunetheweb commented May 23, 2025

Description

Chrome 138 will add two new features for Speculation Rules:

Motivation

New features

Additional details

target_hint

Chrome Status link: https://chromestatus.com/feature/5162540351094784
Explainer link: https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints

Clear-site-data

Chrome Status link: https://chromestatus.com/feature/4755745652080640
Explainer link: https://github.com/WICG/nav-speculation/blob/main/clear-site-data-integration.md

Related issues and pull requests

BCD PR: mdn/browser-compat-data#26893

@tunetheweb tunetheweb requested review from a team as code owners May 23, 2025 23:47
@tunetheweb tunetheweb requested review from hamishwillee, chrisdavidmills and wbamberg and removed request for a team May 23, 2025 23:47
@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs Content:WebAPI Web API docs Content:HTTP HTTP docs size/m [PR only] 51-500 LoC changed labels May 23, 2025
Copy link
Contributor

github-actions bot commented May 23, 2025

Preview URLs

Flaws (3)

Note! 2 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/HTTP/Reference/Headers/Clear-Site-Data
Title: Clear-Site-Data header
Flaw count: 3

  • unknown:
    • No generic content config found
    • no blog root
    • no blog root

(comment last updated: 2025-05-30 04:09:59)

Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tunetheweb - looks pretty clear to me. I've added some suggestions for discussion. I'd like to see the BCD go in before we push this in if possible.

@tunetheweb
Copy link
Contributor Author

Thanks @tunetheweb - looks pretty clear to me. I've added some suggestions for discussion. I'd like to see the BCD go in before we push this in if possible.

SGTM. I opened both together so I’d know the anchor links when adding to BCD but yeah let’s wait until both are ready to merge. Plus a few things still open in this PR to resolve.

tunetheweb and others added 4 commits May 26, 2025 07:10
…nrules/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…nrules/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…nrules/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@chrisdavidmills chrisdavidmills removed their request for review May 26, 2025 07:46
@tunetheweb
Copy link
Contributor Author

@hamishwillee could you take another look? Also the BCD PR (mdn/browser-compat-data#26893) has been merged now so you can merge this too if you're happy with the changes.

tunetheweb and others added 3 commits May 29, 2025 09:49
…nrules/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Comment on lines +122 to +124
For example, a client-side rendered application that pulls in data from JavaScript might use `prerenderCache` on state change to discard the prerendered pages, but keep the prefetched HTML to use when the page is rendered (or prerendered again).

On the other hand, if the prefetched HTML document contains stale data but the corresponding prerendered page is set up to refresh the data when it is displayed, you may not need to use `prerenderCache` but you probably will want to use the `prefetchCache` directive: so that the stale HTML isn't used in a future prerender.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I did a minor subedit around this bit to refer to prefetched HTML document rather than just "HTML document". I know they are the same thing, but mentioning "prefetch" here makes directly associates this HTML document in my mind with the relevant directive.

Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much @tunetheweb

The last round of changes you did look good. I was interested to see the change regarding targets in where not being needed. Make sense.

FYI I work Mon, Tue, Friday on this stuff. Sometimes I might take longer than you expect to rereview. Sorry!

@hamishwillee hamishwillee merged commit 08d05cd into mdn:main May 30, 2025
8 checks passed
@tunetheweb
Copy link
Contributor Author

FYI I work Mon, Tue, Friday on this stuff. Sometimes I might take longer than you expect to rereview. Sorry!

No bother at all! It's rarely super critical to get these in (and will make it clear if it ever is) and much more important to be right. In this case for example I'm actually well ahead of the game as Chrome 138 (where these changes are landing) is still a few weeks out.

Thanks so much for your help in polishing this. Much better for you feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTML Hypertext Markup Language docs Content:HTTP HTTP docs Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants