|
1 | 1 | ## Usage Examples
|
2 | 2 |
|
3 |
| -* `<img src=foo group=visual>` - An image is to be loaded with relatively high |
4 |
| - priority as it's impacting the initial visual. |
5 |
| -* `<img src=foo before=visual>` - An image is to be loaded with higher priority |
6 |
| - than other visually impacting resources. (e.g. since it's a hero image, more |
7 |
| - important than other in-viewport images) |
8 |
| -* `<link rel=preload href=foo as=image group=visual>` - An image should be |
9 |
| - preloaded as impacting the initial visual, but not load before critical |
10 |
| - resources were discovered, as it will likely contend on bandwidth with them. |
11 |
| -* `<link rel=preload href=foo as=image group=critical>` - An image should be |
12 |
| - preloaded as a critical resource (e.g. potentially because the page has no |
13 |
| - other critical resources as they are all inlined) |
| 3 | +* `<script src=foo importance=critical>` - A script is to be loaded with critical importance as it is necessary for the core user experience. |
| 4 | +* `<img src=foo importance=high>` - An image is to be loaded with high importance. It could be important (e.g hero image, brand logo, other in-viewport image) but not critical to the overall experience loading up. |
| 5 | +* `<link rel=preload href=foo as=image importance=medium>` - An image should be preloaded with medium importance, but not load before critical resources were discovered, as it will likely contend on bandwidth with them. |
| 6 | +* `<link rel=preload href=foo as=image importance=critical>` - An image should be preloaded as a critical resource (e.g. potentially because the page has no other critical resources as they are all inlined) |
14 | 7 | * That's already the default behavior of browsers in current
|
15 | 8 | implementations, but developers would be able to explicitly state that
|
16 | 9 | preference.
|
17 |
| -* `<link rel=stylesheet href=foo group=late>` - can be used to indicate |
18 |
| - non-blocking style which isn't impacting the initial visual experience. |
19 |
| -* `<iframe src=foo group=late>` - would downgrade the importance of the iframe |
20 |
| - and all its subresources. |
| 10 | +* `<link rel=stylesheet href=foo importance=low>` - can be used to indicate |
| 11 | + low importance/non-blocking style which isn't impacting the core experience. |
| 12 | +* `<iframe src=foo importance=low>` - would downgrade the importance of the iframe and all its subresources. |
21 | 13 | * TBD - what does the fetch API parameter look like?
|
22 | 14 | * TBD - how does explicit reprioritization look like?
|
23 | 15 |
|
@@ -131,4 +123,4 @@ the main page content and should be given CPU and bandwidth resources
|
131 | 123 | accordingly.
|
132 | 124 |
|
133 | 125 | When such a signal is applied to an iframe, it should be equally applied
|
134 |
| -to all the subresources that the iframe loads. |
| 126 | +to all the subresources that the iframe loads. |
0 commit comments