expect-no-linked-resources

Unofficial Proposal Draft,

More details about this document
This version:
https://explainers-by-googlers.github.io/expect-no-linked-resources
Issue Tracking:
GitHub
Editor:
(Google LLC)

Abstract

The expect-no-linked-resources configuration point in Document Policy allows a developer to hint the user agent to optimize loading behavior assuming the HTML response has no resources embedded within its markup.

Status of this document

1. Introduction

A document can hint the user agent that its HTML markup has no resources embedded to allow the user agent to better optimize the loading sequence, such as not using the default speculative parsing behavior, by using the expect-no-linked-resources configuration point in Document Policy.

The consequence of using this header may be that a user agent would skip certain optimizations such as the Document’s active speculative HTML parser that attempts to find resources embedded in HTML.

2. Document-Policy Integration

This specification defines a configuration point in Document Policy with name "expect-no-linked-resources". Its type is boolean with default value false.

Document-Policy: expect-no-linked-resources

3. Modifications to HTML’s Speculative HTML parsing

  1. Insert a step after step 1 of start the speculative HTML parser as following:

    1. Get the document policy value of the "expect-no-linked-resources" configuration point for the Document. If the result is true, then the user agent may return.

Conformance

Document conventions

Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification.

All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. [RFC2119]

Examples in this specification are introduced with the words “for example” or are set apart from the normative text with class="example", like this:

This is an example of an informative example.

Informative notes begin with the word “Note” and are set apart from the normative text with class="note", like this:

Note, this is an informative note.

Tests

Tests relating to the content of this specification may be documented in “Tests” blocks like this one. Any such block is non-normative.


Index

Terms defined by reference

References

Normative References

[DOCUMENT-POLICY]
Document Policy. cg-draft. URL: https://wicg.github.io/document-policy/
[DOM]
Anne van Kesteren. DOM Standard. Living Standard. URL: https://dom.spec.whatwg.org/
[RFC2119]
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Best Current Practice. URL: https://datatracker.ietf.org/doc/html/rfc2119