diff --git a/index.html b/index.html index 4243d13..e10675e 100644 --- a/index.html +++ b/index.html @@ -4,14 +4,14 @@ Client Hints Infrastructure - + - + - - - - - + - - -

Client Hints Infrastructure

-

Draft Community Group Report,

+

Draft Community Group Report,

This version: @@ -629,7 +679,7 @@

2 redirections.

  • -

    Defines the Critical-CH response header, which servers may use to request a reload +

    Defines the Critical-CH response header, which servers may use to request a restart to include critical Client Hints missing in the initial load.

  • Integrates those concepts with the [HTML] and [FETCH] specifications, @@ -691,14 +741,15 @@

    Accept-CH cache that means only subsiquent loads of that origin will include the hints. If it’s critical that every load (including the first) has the requested Client Hints, -then the server can set a Critical-CH header to request a reload. The Critical-CH header itself does not modify the Accept-CH cache.

    -

    A reload will only occur when a hint in the Accept-CH header is both not in the Accept-CH cache and in the Critical-CH header. If hints listed in -the Critical-CH header are already in the Accept-CH cache no reload is +then the server can set a Critical-CH header to request a restart. The Critical-CH header itself does not modify the Accept-CH cache.

    +

    A restart will only occur when a hint in the Accept-CH header is both not in the Accept-CH cache and in the Critical-CH header. If hints listed in +the Critical-CH header are already in the Accept-CH cache no restart is needed as they were sent. If hints listed in the Critical-CH header are not -in the Accept-CH header a reload would not result in the hints being included +in the Accept-CH header a restart would not result in the hints being included anyway.

    +

    The restart retries the entire navigation (including any prior redirects).

    There MAY be multiple Critical-CH headers per-response and sf-lists can be split across lines as long as each line contains at least one token.

    -

    When asked if the user agent should reload page for critical client hints given a settingsObject and response:

    +

    When asked if the user agent should restart loading the page for critical client hints given a settingsObject and response:

    1. If settingsObject is a non-secure context, abort these steps.
    2. Let browsingContext be settingsObject’s global object's browsing context. @@ -764,25 +815,39 @@

      4. 4.1. Navigable

      Add a new field to navigable:

        -
      • A has reloaded for Critical-CH boolean, initially false. +
      • A Critical-CH restart time DOMHighResTimeStamp, initially 0. + This records the time the navigation was restarted to ensure required Client Hint + headers will be sent.

      At populating a session history entry, in step 6 after substep 7 insert the following:

        -
      1. Let shouldReloadForCriticalClientHints be false. +
      2. Let shouldRestartForCriticalClientHints be false.
      3. - If navigable’s has reloaded for Critical-CH is false: + If navigable’s Critical-CH restart time is 0:
          -
        1. Let shouldReloadForCriticalClientHints be the result of running should reload page for critical client hints with the relevant settings object and response. +
        2. Let shouldRestartForCriticalClientHints be the result of running should restart page for critical client hints with the relevant settings object and response.
      4. Run create or override the cached client hints set with the relevant settings object and response as inputs.
      5. - If shouldReloadForCriticalClientHints then: + If shouldRestartForCriticalClientHints then: +
          +
        1. Set navigable’s Critical-CH restart time to the current high resolution time. +
        2. Restart the initial navigation (before any redirects). +
        +
      6. + If navigable’s Critical-CH restart time is not 0:
          -
        1. Set navigable’s has reloaded for Critical-CH to true. -
        2. reload navigable. +
        3. Set navigationParams’s Critical-CH restart time to be navigable’s Critical-CH restart time.
      +

      Clarify how "Restart the initial navigation (before any redirects)" integrates with the HTML spec. [Issue #154]

      +

      At navigation params, append the following:

      +
      +
      Critical-CH restart time +
      a DOMHighResTimeStamp used for creating the navigation timing entry for the new Document. + This records the time the navigation was restarted to ensure required Client Hint headers will be sent. +

      4.3. Service Worker initialization

      At set up a worker environment settings object, after step 6, add the following step: @@ -1029,17 +1094,17 @@

      client hints token, in § 7.1
    3. create or override the cached client hints set, in § 3.2 +
    4. Critical-CH restart time, in § 4.1
    5. Delegate-CH, in § 3.4
    6. field-name, in § 9
    7. find client hint value, in § 7.4 -
    8. has reloaded for Critical-CH, in § 4.1
    9. high-entropy client hint, in § 7.3
    10. low entropy hint table, in § 7.3
    11. low-entropy hint table, in § 7.3
    12. origin, in § 3.2
    13. policy-controlled client hints features, in § 7.2
    14. remove client hints from redirect if needed, in § 5 -
    15. should reload page for critical client hints, in § 3.3 +
    16. should restart loading the page for critical client hints, in § 3.3
    17. update the client hints set from cache, in § 3.2

      Terms defined by reference

      @@ -1062,6 +1127,12 @@

      request
    18. value +
    19. + [HR-TIME-3] defines the following terms: +
        +
      • DOMHighResTimeStamp +
      • current high resolution time +
    20. [HTML] defines the following terms:
        @@ -1078,7 +1149,6 @@

        permissions policy
      • populating a session history entry
      • relevant settings object -
      • reload
      • same origin
      • script
      • set up a worker environment settings object @@ -1101,6 +1171,11 @@

        set (for map)
      • user agent
      +
    21. + [NAVIGATION-TIMING-2] defines the following terms: +
        +
      • create the navigation timing entry +
    22. [PERMISSIONS-POLICY-1] defines the following terms:
        @@ -1128,10 +1203,14 @@

        N
        [FETCH]
        Anne van Kesteren. Fetch Standard. Living Standard. URL: https://fetch.spec.whatwg.org/ +
        [HR-TIME-3] +
        Yoav Weiss. High Resolution Time. URL: https://w3c.github.io/hr-time/
        [HTML]
        Anne van Kesteren; et al. HTML Standard. Living Standard. URL: https://html.spec.whatwg.org/multipage/
        [INFRA]
        Anne van Kesteren; Domenic Denicola. Infra Standard. Living Standard. URL: https://infra.spec.whatwg.org/ +
        [NAVIGATION-TIMING-2] +
        Yoav Weiss; Noam Rosenthal. Navigation Timing Level 2. URL: https://w3c.github.io/navigation-timing/
        [PERMISSIONS-POLICY-1]
        Ian Clelland. Permissions Policy. URL: https://w3c.github.io/webappsec-permissions-policy/
        [RFC2119] @@ -1153,10 +1232,11 @@

        Issues Index

        Clarify detection of link, style, or script element execution. [Issue #110]
        +
        Clarify how "Restart the initial navigation (before any redirects)" integrates with the HTML spec. [Issue #154]
        Should we tie low-entropy-ness to allowlists, generally?
        Links for image features are broken, need to actually define that and link to them.
        - - + - + \ No newline at end of file +} + \ No newline at end of file