It’s difficult to keep track of everything happening in web performance these days, isn’t it? In this newsletter, we decided to do just that — look into all the shiny new features available today or coming in shortly, as well as tools and strategies to boost performance in 2022.
We also have been updating the Front-End Performance Checklist over the years. And if you prefer a video recording of the 2.5h workshop around some of these techniques, you can still get it, with all proceeds still donated to humanitarian aid in Ukraine, with over 18,000 EUR donated so far.
In the meantime, let’s look into how to optimize LCP, how to optimize for performance, priority hints, Back/Forward cache, cache-control, image sizes and a few useful tools along the way. If you’d love to dive deeper, take a look at the incredible Web Performance Masterclass by Harry Roberts that we will be running in May 2022. There are still some early-birds left.
Of course, we have plenty of other workshops coming up as well, including Designing For Complex UIs and Deep Dive on Accessibility Testing starting this week. Plus, our dear friend Liam from Shopify will be running a free 1.5h-session on Working With Shopify Themes — all around Shopify’s themes and Liquid templating languages. Definitely worth a visit. As usual, we hope to see you there.
Stay kind and absolutely smashing, everyone!
— — Vitaly (@smashingmag)
1. Optimizing Largest Contentful Paint
Largest Contentful Paint (LCP) measures the render time of the largest image or text block visible within the viewport, relative to when the page first started loading. It’s the Core Web Vital that is the easiest to optimize, yet, according to the Chrome UX Report, only half of origins in the dataset had a good LCP. Let’s do better.
In his article “Optimising Largest Contentful Paint”, Harry Roberts dives deep into LCP, sharing some interesting tricks and optimizations, as well as pitfalls and bugs. The main takeaways: Text-based LCPs are the fastest. Of the image-based LCP types,
<img /> and
poster are the fastest, while
<image>s defined in
<svg> are slow because they are hidden from the preload scanner. As Harry suggests, there are two things you should avoid entirely: Don’t lazy-load your LCP candidate and don’t build your LCP in JS. Gold! (cm)
2. Performance Optimization Strategy
A lot of little things add up to improving a site’s performance. However, keeping track of all of them can be quite tricky. Our very own Vitaly Friedman compiled a practical Performance Optimization Strategy with things you might want to consider.
The list covers everything you need to keep in mind when improving performance, divided up into six parts — from getting a bigger picture of the state of things and cleaning up and reordering the
3. Request Map Generator
Trawling through initiators, referers, and redirect headers in WebPageTest to find out where the third-party requests on a site are coming from is a tedious task. Simon Hearne’s Request Map Generator is here to change that.
All you need to do to find the third parties on your site is enter a URL, and the Request Map Generator identifies the third parties that are in use, where your transmitted bytes are coming from, and how slow your domains are. Every request is visualized as a node in the request map — the bigger the node, the more bytes are transmitted. A good start if you want to analyze the users of your site and how they got there. (cm)
4. Upcoming Front-End & UX Workshops
You might have heard it: we run online workshops around frontend and design, be it accessibility, performance, navigation, or landing pages. In fact, we have a couple of workshops coming up soon, and we thought that, you know, you might want to join in as well.
As always, here’s an overview of our upcoming workshops:
- Designing For Complex UI Masterclass UX
Vitaly Friedman. Apr 6–14
- Deep Dive On Accessibility Testing Dev
with Manuel Matuzović. Apr 7 – 21
- Interface Design Patterns UX Training UX
Vitaly Friedman. Apr 15 – May 13
- Successful Design Systems Workflow
with Brad Frost. Apr 18 – May 12
- The TypeScript Masterclass Dev
with Stefan Baumgartner. Apr 19 – May 3
- Jump to all online workshops →
5. Optimizing Resource Loading
When a browser parses a web page, it assigns resources such as images, scripts, and CSS a fetch
priority in an attempt to download the resources in an optimal order. And while this often works well, it might not be optimal in all cases. If you want to optimize resource loading on your site, Leena Sohoni, Addy Osmani, and Patrick Meenan summarized how priority hints can help you enable optimal loading and improve Core Web Vitals along the way.
Priority hints comes in particularly handy to boost the priority of the LCP image, increase the priority of
async snippets, or decrease the priority of late-body scripts to allow for better sequencing with images. Please note that they are only available in Chromium-based browsers at the moment, though. Other browsers will ignore the attribute and use their default prioritization heuristics. (cm)
6. Back/Forward Cache
We all know those situations: You visited a website and clicked a link to go to another page only to realize that it’s not what you expected, so you click the Back button. In moments like these, back/forward cache (bfcache) can make a siginificant difference in how fast the previous page loads.
7. Cache Control For Civilians
How is your knowledge of caching and cache-control headers? No worries if you feel you could know more or are rather clueless even, Harry Roberts’ article “Cache-Control for Civilians” helps you make sense of it all — for good.
Harry’s refresher starts off taking a look at the
Cache-Control HTTP header, which is one of the most common and effective ways to manage the caching of your assets, and goes on to explore its directives and their optimum use cases in detail. Harry also covers some real-world scenarios and the kinds of
Cache-Control headers that suit them best. A great summary to ensure you don’t miss out on the powerful opportunities that caching brings along. (cm)
8. Preloading Responsive Images
Browsers usually request images after critical resources like stylesheets and fonts. But did you know that you can change this order even for responsive images with
srcset attributes? Stefan Judis explains how it works.
As it turns out, you can include
<link rel=“preload”> in your document’s
head and use
imagesizes to give browsers the information of high-priority images.
imagesizes follow the same rules as
sizes, so you can reuse the same attribute values you use for the image itself. The feature is supported in all browsers except for Safari where it’s still in the “Experimental features” section. (cm)
9. Website Technology Lookup
If you need to analyze websites at scale but don’t have time to configure, host, debug, and maintain your own infrastructure, Wappalyzer offers a convenient solution. It instantly reveals the technology stack of any website.
The technology lookup gives you information on CMS, e-commerce platform and payment processor, programming languages, frameworks and libraries, web servers, analytics, advertising, security protocols, and more for any URL. The pro version also includes company and contact information. A free trial version is available. (cm)
That’s All, Folks!
Thank you so much for reading and for your support in helping us keep the web dev and design community strong with our newsletter. See you next time!
This newsletter issue was written and edited by Cosima Mielke (cm), Vitaly Friedman (vf) and Iris Lješnjanin (il).
- Free Fonts and Illustrations
- The Incredible Web
- Front-End Accessibility
- Interface Design & UX
- Front-End Helpers
- Fearless Salary Negotiation and Job Interviews
- Design Systems
- Design And UX
- Friendly Little Front-End Tools
Looking for older issues? Drop us an email and we’ll happily share them with you. Would be quite a hassle searching and clicking through them here anyway.