How To Improve Largest Contentful Paint for Faster Load Times - Calibre
A no-nonsense checklist of good performance advice from Karolina.
A no-nonsense checklist of good performance advice from Karolina.
Addy takes a deep dive into making sure your images are performant. There’s a lot to cover here—that’s why I ended up splitting it in two for the responsive design course: one module on responsive images and one on the picture
element.
Progressive Enhancement allows us to use the latest and greatest features HTML, CSS and JavaScript offer us, by providing a basic, but robust foundation for all.
Some great practical examples of progressive enhancement on one website:
type="module"
to enhance a form with JavaScript,picture
element to provide webp
images in HTML.All of those enhancements work great in modern browsers, but the underlying functionality is still available to a browser like Opera Mini on a feature phone.
Remy has an excellent improvement on that article I linked to yesterday on using srcdoc
with iframes. Rather than using srcdoc
instead of src
, you can use srcdoc
as well as src
. That way you can support older browsers too!
This is a clever use of the srcdoc
attribute on iframes.
The title is somewhat misleading—currently it’s about native lazy-loading for Chrome, which is not (yet) the web.
I’ve just been adding loading="lazy"
to most of the iframes and many of the images on adactio.com, and it’s working a treat …in Chrome.
Using IntersectionObserver
to lazy load images—very handy for webmention avatars.
The loading
attribute for images and iframes is coming to Chrome. The best part:
You can also use
loading
as a progressive enhancement. Browsers that support the attribute can get the new lazy-loading behavior withloading=lazy
and those that don’t will still have images load.
Jeremy Wagner offers a deep dive into lazy loading images (and video) with some advice for considering the no-JavaScript situation too.
Monica takes a look at the options out there for loading web fonts and settles on a smart asynchronous lazy-loading approach.