diff --git a/README.md b/README.md index cc0d9c9..2701dd3 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,14 @@ parts of pages are addressable by named anchors or elements with ids. This feature, as currently [specified in this repo](https://wicg.github.io/ScrollToTextFragment), is shipping to stable channel in Chrome M80. +We're currently adding the ability for authors to disable this feature on their +pages if they choose. To experiment with this opt-out today, websites can +register for the [ForceLoadAtTop origin trial](https://developers.chrome.com/origintrials/#/view_trial/3253850730775183361), +which will ensure that no scrolling happens on page load, including via regular +fragment anchors and scroll restoration. For details on how to register a +website for an origin trial, see the [Origin Trials Guide for Web Developers](https://github.com/GoogleChrome/OriginTrials/blob/gh-pages/developer-guide.md). +Please help shape the final API by providing feedback! + ### Motivating Use Cases When following a link to read a specific part of a web page, finding the @@ -505,6 +513,21 @@ Visual emphasis is performed using a visual-only indicator (i.e. don’t cause selection), styled by the UA and undetectable from script. This helps prevents drag-and-drop or copy-paste attacks. +### Opting Out + +For product reasons, or acute privacy restrictions, pages may wish to disallow +scrolling to a text fragment (or regular fragment) on load, see +[#80](https://github.com/WICG/ScrollToTextFragment/issues/80). To allow websites +to opt out of text fragments, we propose adding a [Document +Policy](https://github.com/w3c/webappsec-feature-policy/blob/master/document-policy-explainer.md) +named force-load-at-top that ensures the page is loaded without any form of +scrolling, including via text fragments, regular element fragments, and scroll +restoration. Websites can use this document policy by serving the HTTP header: + +``` +Document-Policy: force-load-at-top +``` + ## Alternatives Considered ### Text Fragment Directive 0.1