Skip to content

Commit a52a3fc

Browse files
authored
Initial commit
0 parents  commit a52a3fc

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# LazyEmbeds: Explainer
2+
3+
## Authors
4+
* [@nyaxt](https://github.com/nyaxt)
5+
6+
## Participate
7+
* [github.com/nyaxt/lazyembeds/issues](https://github.com/nyaxt/lazyembeds/issues)
8+
9+
## Introduction
10+
11+
We (Google Chrome team) are currently exploring if perceived page load speed can be improved by introducing a different loading schedule to third-party embeds, such as social media, videos, analytics, live chat.
12+
13+
Here, we draw attention to cross-origin <iframe>s, which is widely used to integrate a website with such 3rd party SaaS.
14+
15+
## Goals
16+
User agent explores different loading schedules for cross-origin <iframe>s. This is done by inserting arbitrary delays before cross-origin iframe to start.
17+
18+
We aim to selectively apply the delay using heuristics gathered from signals such as:
19+
- Whether <iframe> is in the viewport or not
20+
- Size of the iframe
21+
- The origin of the iframe
22+
- etc.
23+
24+
## Non-goals
25+
We currently do not plan to apply the delay to same-origin iframes.
26+
27+
## The monkey patch to HTML spec
28+
The [*will lazy load element steps*](https://html.spec.whatwg.org/#will-lazy-load-element-steps) is modified to take `request` as an additional parameter. Also, we insert the following steps before step 3:
29+
30+
3. If _element_’s lazy loading attribute is set and is in the Eager state, then return false.
31+
32+
4. If _element_’s document’s URL is not same origin with [_request_](https://fetch.spec.whatwg.org/#concept-request)’s URL’s origin, optionally, the user agent may choose to return true, if it believes doing so would improve the loading experience.

0 commit comments

Comments
 (0)