Skip to content
This repository was archived by the owner on Mar 10, 2023. It is now read-only.

Commit b804104

Browse files
authored
Merge pull request #15 from addyosmani/patch-1
Update attribute name from group -> importance (#14)
2 parents 0b07d48 + 488a668 commit b804104

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

EXAMPLES.md

+8-16
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
11
## Usage Examples
22

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)
147
* That's already the default behavior of browsers in current
158
implementations, but developers would be able to explicitly state that
169
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.
2113
* TBD - what does the fetch API parameter look like?
2214
* TBD - how does explicit reprioritization look like?
2315

@@ -131,4 +123,4 @@ the main page content and should be given CPU and bandwidth resources
131123
accordingly.
132124

133125
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

Comments
 (0)