generated from explainers-by-googlers/template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.bs
45 lines (35 loc) · 2.69 KB
/
index.bs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<pre class='metadata'>
Title: expect-no-linked-resources
Shortname: expect-no-linked-resources
Level: None
Status: w3c/UD
Repository: explainers-by-googlers/expect-no-linked-resources
URL: https://explainers-by-googlers.github.io/expect-no-linked-resources
Editor: Alex N. Jose, Google LLC https://google.com, alexnj@google.com
Abstract: The `expect-no-linked-resources` <a href="https://wicg.github.io/document-policy#configuration-point">configuration point</a> in [[!document-policy|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.
Markup Shorthands: markdown yes, css no
Complain About: accidental-2119 yes, missing-example-ids yes
Assume Explicit For: yes
Die On: warning
WPT Path Prefix: TODO-API-LABEL
WPT Display: closed
Include MDN Panels: if possible
Include Can I Use Panels: yes
</pre>
# Introduction # {#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` <a href="https://wicg.github.io/document-policy#configuration-point">configuration point</a> in [[!document-policy|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](https://html.spec.whatwg.org/multipage/parsing.html#active-speculative-html-parser) that attempts to find resources embedded in HTML.
# Document-Policy Integration # {#document-policy-integration}
This specification defines a <a href="https://wicg.github.io/document-policy#configuration-point">configuration point</a>
in [[!document-policy|Document Policy]] with name "expect-no-linked-resources". Its
<a href="https://wicg.github.io/document-policy#configuration-point-type">type</a> is `boolean`
with <a href="https://wicg.github.io/document-policy#configuration-point-default-value">default value</a>
`false`.
<div class='example'>
```
Document-Policy: expect-no-linked-resources
```
</div>
# Modifications to HTML's Speculative HTML parsing # {#modifications-html-speculative-parsing}
1. Insert a step after step 1 of [start the speculative HTML parser](https://html.spec.whatwg.org/#start-the-speculative-html-parser) as following:
1. <a href="https://wicg.github.io/document-policy#algo-get-policy-value">Get the document policy value</a> of the "expect-no-linked-resources" <a href="https://wicg.github.io/document-policy#configuration-point">configuration point</a> for the [=/Document=]. If the result is `true`, then the user agent may return.