Smashing Magazine - #347: Web Performance

On Core Web Vitals, 3rd-Party-Scripts, B/F Cache, Priority Hints and responsive images preloading. Issue #347: Web Performance Apr 5, 2022 View in the browser 💨

Smashing Newsletter

Dear Smashing Friends,

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.

Introduction to Working With Shopify Themes

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.

Optimizing Largest Contentful Paint

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.

Performance Optimization Strategy

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 <head> to managing critical CSS and CSS loading, improving web font loading, optimizing the rendering for LCPs, and deferring/delaying JavaScript and third parties. Keep it in your bookmarks for reference or cherry-pick the things that are relevant for your needs and create a custom performance optimization checklist. (cm)


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.

Request Map Generator

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.

Smashing Online Events
With online workshops, we aim to give you the same experience and access to experts as in an in-person workshop from wherever you are.

As always, here’s an overview of our upcoming 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.

Optimizing Resource Loading With Priority Hints

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)


From our sponsor

Best-In-Class Membership Software Used By The Biggest Creators On The Web

Best-In-Class Membership Software Used By The Biggest Creators On The Web
Memberful is built by developers for developers. Give your client complete control and ownership of all things related to their brand, their audience, and their membership, by seamlessly integrating Memberful with the tools they already use like Mailchimp, WordPress, and Discord. Check out Memberful for free today.


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.

Back/Forward Cache

Contrary to HTTP cache, bfcache stores a complete snapshot of a page (including JavaScript) as the user is navigating away. So if they decide to return, the browser can instantly restore the entire page from memory. If you want to dive deeper into how it works and how you can optimize your pages for bfcache across all browsers, Philip Walton summarized everything you need to know. (cm)


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.

Cache-Control for Civilians

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 sizes and srcset attributes? Stefan Judis explains how it works.

Preloading Responsive Images<

As it turns out, you can include <link rel="preload"> in your document’s head and use imagesrcset and imagesizes to give browsers the information of high-priority images. imagesrcset and imagesizes follow the same rules as srcset and 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.

Wappalyzer

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)


10. New On Smashing Job Board


11. Recent Smashing Articles


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).


Sent to truly smashing readers via Mailchimp.
We sincerely appreciate your kind support. You
rock.

Follow us on Twitter Join us on Facebook

unsubscribe update preferences view in your browser

Older messages

#346: UX and Interface Design

Tuesday, March 29, 2022

How to prevent errors, measure usability, dive into internationalization and User Research Report 2022. Issue #346 • Mar 29, 2022 • View in the browser 💨 Smashing Newsletter Dear Smashing Friends, A

#345: Little Front-End Utilities

Tuesday, March 22, 2022

With a resource hints validator, VS Code extensions, hidden npm packages, tools for third-parties, user testing and useful round-ups. Issue #345 • Mar 22, 2022 • View in the browser 💨 Smashing

#344: Front-End Accessibility

Tuesday, March 15, 2022

With accessible focus indicators, accessible charts, toggles and how to document accessibility in your projects. Issue #344 • Mar 15, 2022 • View in the browser 💨 Smashing Newsletter Dziękuję Smashing

#343: New Front-End Techniques

Tuesday, March 8, 2022

With CSS cascade layers, SVG stress test, handling text over images, third-party JavaScript and performance optimization. Issue #343 • Mar 8, 2022 • View in the browser 💨 Smashing Newsletter Dobryden

342: Interface Design & UX

Tuesday, March 1, 2022

With design patterns, interface design techniques and pointers to useful UX resources. Issue #342 • Mar 1, 2022 • View in the browser 💨 Smashing Newsletter Dobryden' Smashing Friends, I was born

You Might Also Like

Behind the Design of Lauren Santo Domingo’s Ski House

Thursday, November 21, 2024

View in your browser | Update your preferences ADPro Peak Style When it comes to clients, says AD100 designer Andre Mellone, “my biggest nightmare is a person who says, 'Carte blanche, do whatever

2025 Interior Design Trends, Revealed

Wednesday, November 20, 2024

View in your browser | Update your preferences ADPro Image may contain: Furniture, Chair, Interior Design, Indoors, Home Decor, and Rug Inside Our Newest Trend Report “Design, like fashion, tries to

Want a free strategy session with us?

Wednesday, November 20, 2024

Plus, the emails editors open most often. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

One Simple Thing You Can Do to Retain Your Staff

Tuesday, November 19, 2024

View in your browser | Update your preferences ADPro By my account, it's not fall until I've watched You've Got Mail, Nora Ephron's '90s film adaptation of the 1930s Hungarian play

#483: UX Writing

Tuesday, November 19, 2024

With writing guides, content testing and practical guides for better content design. Issue #483 • Nov 19, 2024 • View in the browser Smashing Newsletter Hej Smashing Friends, Every digital product

Accessibility Weekly #423: Beautiful Focus Outlines

Monday, November 18, 2024

November 18, 2024 • Issue #423 View this issue online or browse the full issue archive. Featured: Beautiful focus outlines "Unfortunately, focus outlines are often overlooked in web design.

175 / Build your ideas without writing any code

Monday, November 18, 2024

Product Disrupt Logo Product Disrupt Half-Monthly Nov 2024 • Part 1 View in browser Welcome to Issue 175 One month ago, I quit my longest-standing job and embarked on a pathless path to let my

Into the Fediverse

Sunday, November 17, 2024

Issue 221: We need decentralized social networks ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

The Books AD Editors Can’t Put Down Right Now

Friday, November 15, 2024

View in your browser | Update your preferences ADPro Good Reads Here at AD PRO, we're all about celebrating a good coffee table book. With crisp project imagery and behind-the-scenes stories tucked

What astrology has to do with PR?

Wednesday, November 13, 2024

and, no we won't tell you to read your chart! ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏