Skip to content

Commit

Permalink
Merge pull request #100 from nickburris/master
Browse files Browse the repository at this point in the history
Add information on ForceLoadAtTop origin trial
  • Loading branch information
Nick Burris authored May 1, 2020
2 parents 3d0d682 + 79afec8 commit afcb0b7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit afcb0b7

Please sign in to comment.