Lazy Loading Inline Frames

There’s a new loading attribute that allows native lazy loading in Chrome. The loading attribute is not a standard yet, but it’s being worked on and I’m really looking forward to it, I think this is a really good feature.
Besides images I noticed that…


This content originally appeared on foobartel.com :: Stream and was authored by foobartel.com :: Stream

There’s a new loading attribute that allows native lazy loading in Chrome. The loading attribute is not a standard yet, but it’s being worked on and I’m really looking forward to it, I think this is a really good feature.

Besides images I noticed that it’s also possible to lazy load iframes. iframes aren’t used that much these days, but when they are, it can be helpful being able to load them only by the time the user scrolls near them, instead of loading all their associated data right away. I’m thinking Google Maps, which send quite a bit of data with their iframe maps, but I haven’t looked at or tried it yet at all.

The way to lazy-load an iframe is straight forward and just the same as you would do with images:

<iframe src="source.html" loading="lazy"></iframe>

Note: The loading attribute is only available in Chrome 76 and later, and as of this writing, no other browsers support it yet.


This content originally appeared on foobartel.com :: Stream and was authored by foobartel.com :: Stream


Print Share Comment Cite Upload Translate Updates
APA

foobartel.com :: Stream | Sciencx (2019-08-23T22:00:00+00:00) Lazy Loading Inline Frames. Retrieved from https://www.scien.cx/2019/08/23/lazy-loading-inline-frames-2/

MLA
" » Lazy Loading Inline Frames." foobartel.com :: Stream | Sciencx - Friday August 23, 2019, https://www.scien.cx/2019/08/23/lazy-loading-inline-frames-2/
HARVARD
foobartel.com :: Stream | Sciencx Friday August 23, 2019 » Lazy Loading Inline Frames., viewed ,<https://www.scien.cx/2019/08/23/lazy-loading-inline-frames-2/>
VANCOUVER
foobartel.com :: Stream | Sciencx - » Lazy Loading Inline Frames. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2019/08/23/lazy-loading-inline-frames-2/
CHICAGO
" » Lazy Loading Inline Frames." foobartel.com :: Stream | Sciencx - Accessed . https://www.scien.cx/2019/08/23/lazy-loading-inline-frames-2/
IEEE
" » Lazy Loading Inline Frames." foobartel.com :: Stream | Sciencx [Online]. Available: https://www.scien.cx/2019/08/23/lazy-loading-inline-frames-2/. [Accessed: ]
rf:citation
» Lazy Loading Inline Frames | foobartel.com :: Stream | Sciencx | https://www.scien.cx/2019/08/23/lazy-loading-inline-frames-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.