Skip to main content
Andrea Verlicchi

Making the web faster and more user-friendly

Blog

  1. Jake Archibald's talk "In the loop", transposed

    Jake Archibald's talk "In the loop" is still one of the best sources of information on how browsers process tasks and are able to respond to user input. As I didn't find anything as comprehensible as that in text format, I transposed his talk into this blog post.

    Read more →
  2. Web performance snippets to debug INP in Chrome dev tools

    After keeping them on my computer for some days, I decided to publish on GitHub this set of web performance snippets to debug INP in Chrome developer tools, or to report data to your analytics.

    Read more →
  3. How to use scheduler.yield to improve web pages responsiveness

    Google Chrome is introducing a new feature called scheduler.yield. This feature allows web developers to explicitly tell the browser to yield control to the main thread. Here are the key points.

    Read more →
  4. Preparing for Interaction to Next Paint (INP), a new Core Web Vital starting March 2024

    As a web performance consultant, I'm always on the lookout for new developments that impact the user experience of websites. One such upcoming change is the introduction of a new metric called Interaction to Next Paint (INP) by Google. Set to become a Core Web Vital in March 2024, INP is designed to measure the time it takes for a website to respond to user interactions. In this blog post, we will delve into what INP is, why it matters, and how companies can prepare themselves to ensure their websites meet this crucial web performance metric.

    Read more →
  5. Talking about How and Why ($) to optimize web performance in 2023

    In 2023 I've been speaking about web performance at conferences, Google Developer Groups (GDG) and local meetups all over Europe. The title of this talk is "How and Why ($) to improve web performance, practical tips for 2023".

    Read more →
  6. I'm a Google Developer Expert for Web Performance

    In December 2023 I became a Google Developer Expert (GDE) for Web Performance. Google Developer Experts is a Google program to create a global network of professionals, influencers, and thought leaders, and enable them to share their knowledge with the developer community, like speaking at events, sharing best practices, and mentoring others.

    Read more →
  7. Against online streaming of local meetups.

    I like to take part to local meetup events. They are informative, fun, and socially engaging at the same time. Sometimes, the meetup organizers get asked to stream events online. It would be a cool feature, I guess, but if you ask me, it would do more harm than good the community. Let me explain why.

    Read more →
  8. Do we still need lazy loading libraries and data-src in 2022?

    Back in the days, as browser support for native lazy loading was not as widespread as today, the best practice was to markup our images with data attributes like data-src and use a JavaScript library like my vanilla-lazyload to start loading them as they entered the visible portion of the page. Is it still a best practice today?

    Read more →
  9. Get speedy with responsive images - LazyLoad Conference 2022

    On June 24th, 2022 I spoke about how to automate responsive images optimisation at the LazyLoad conference 2022. Here's the video of my talk.

    Read more →
  10. Images optimisation 4.0, automate your work with a user-centric approach - CSS Day 2022

    On April 1st 2022 I spoke about responsive images optimisation 4.0 at the CSS Day Conference 2022 in Faenza, Italy. This talk – in Italian language – is on how to become more productive by automating responsive images.

    Read more →
  11. How to integrate git in Mac OS Terminal (shell)

    Now that zsh is the default shell on Mac OS terminal, you might want to setup you new Mac or VS Code terminal to have a smart integration with git, something similar to git bash for Windows.

    Read more →
  12. How to integrate git in Mac OS Terminal (shell)

    Now that zsh is the default shell on Mac OS terminal, you might want to setup you new Mac or VS Code terminal to have a smart integration with git, something similar to [git bash](https://gitforwindows.org/) for Windows.

    Read more →
  13. An elegant technique to lazyload images in Swiper, and lazily create Swiper instances

    Say you have multiple carousels in a page, each one containing multiple images, and you want to download only the images that are inside the visible portion of the page, and maybe save some CPU time by lazily create the carousel instances. I think I’ve found a valuable and elegant technique to do so.

    Read more →
  14. vanilla-lazyload vs lazysizes

    As the author of vanilla-lazyload, it's not the first time I get asked the question: What are the differences between vanilla-lazyload and lazysizes? This blog post is the answer to that question.

    Read more →
  15. Quicklink case study: faster pages, increased page views

    Quicklink is a lightweight library created by Addy Osmani (Google) that prefetches pages linked to the current page, as the links to those pages enter the visible portion of the page (viewport). Here's a case study for it.

    Read more →
  16. aspect-ratio: A modern way to reserve space for images and async content in responsive design

    To avoid layout shifting and optimize for the Cumulative Layout Shift (CLS) Web Vital in you web pages, you need to reserve space for any content that might be rendered later in time. This is the case for images, videos and any asynchonously loaded content (e.g with AJAX calls). Here's a new way to do it.

    Read more →
  17. A clever way to serve WebP images to modern browsers and JPG to IE

    Before the day Safari started to support WebP images, we were forced to use the picture tag to serve WebP images to browsers supporting it. Today all modern browsers support WebP, so there's probably a clever way to do that using a single tag, img.

    Read more →
  18. How to cap image fidelity to 2x and save 45% image weight on high-end mobile phones

    With the rise of very high density “super retina” displays in the newest high-end devices, capping image fidelity to 2x leads to a big improvement in terms of rendering speed, and no perceivable quality loss for your users. Here’s a new best practice on how to do that.

    Read more →
  19. How to optimise for CLS when loading more content asynchronously

    Cumulative Layout Shift (CLS) is an important, user-centric metric for measuring visual stability because it helps quantify how often users experience unexpected layout shifts — a low CLS helps ensure that the page is delightful.

    Read more →
  20. Lazy load responsive images in 2020

    Do you want to boost performance on your website? You can do that by using **responsive images and lazy loading! In this article, you will find the HTML, JavaScript, and CSS code to lazy load responsive images, to make browsers use modern image formats like WebP and Jpeg2000, and to enable native lazy load where supported.

    Read more →
  21. How to productively use the new Chromium-based Microsoft Edge browser

    A practical guide on how to productively use the new Chromium-based Microsoft Edge browser

    Read more →
  22. Critical CSS with Jekyll and SASS

    My blog used to be run by Jekyll on GitHub pages and its CSS was built using SASS. Today I decided to boost performance even more inlining the render-blocking critical CSS, but even searching the internet I struggled to find an easy way to do it. This post is for you, in case you want to do the same.

    Read more →
  23. Web Share API, the step after PWA

    Today I experimented with the Web Share API and implemented it on this website, just to begin. Here's what I did and how you can implement it on your website.

    Read more →
  24. Making my blog a Progressive Web Application

    Some of my workmates and I took part to a Google Hackathon about Progressive Web Application and we learned a lot, so I've decided to enable this website as a PWA. Here's what I did.

    Read more →
  25. A smashing article on hybrid lazy loading

    On May 6th, 2019 I wrote my first article on Smashing Magazine: Hybrid Lazy Loading, A Progressive Migration To Native Lazy Loading.

    Read more →
  26. Native lazy loading and js-based fallback with vanilla-lazyload 12

    On April 6th 2019, Addy Osmany wrote about native image lazy-loading. Two days later Yvain, a front-end developer from Paris, asked me if my vanilla-lazyload could be a loading attribute polyfill, inspiring me to develop and release version 12 of my script, which features a new use_native option to enable native lazy-loading where supported. You can already use it today.

    Read more →
  27. Responsive and accessible table design

    How to make a potentially wide table fit on small devices, without losing readability and accessibility? Here are simple solutions to make tables look like lists, lists look like tables, in responsive and accessible design.

    Read more →
  28. Lazy load responsive images in 2019

    In the latest years, both at my job and as maintainer of a LazyLoad script, I've specialized in lazy loading of responsive images. Today I'm going to show you what HTML, CSS and JavaScript code you need to write in 2019 in order to serve responsive images and load them lazily.

    Read more →
  29. Check if an element is still inside viewport after a given time

    What would you do if somebody asked you to load a DOM element only if it stays inside the viewport for a given time? You would use vanilla-lazyload, wouldn't you?

    Read more →
  30. Create a JavaScript library using ES2015 modules, Gulp, Rollup and Jest

    Let's see how to write a JavaScript library using ES2015 transpiled with Babel, featuring ES modules packed up using Rollup via Gulp, and Jest to test your code.

    Read more →
  31. Intersection Observer and lazy loading of elements

    In August 2017 the Intersection Observer API, a new exciting browser API, finally gained quite wide support. We can use it to know when two DOM elements intersect, or when a given DOM element enters the browser viewport. The lazy loading of images is just the case.

    Read more →
  32. Using CSS variables as a spacing unit

    Here I show you how you can CSS variables, popular name of CSS custom properties, to scale your layout spaces across different media queries.

    Read more →
  33. Changing text color for contrast based on background lightness

    If you had to change the color of some fixed-positioned text based on the lightness of its scrolling background, how would you do that? CSS filters, blend modes? But what if you had to support all browsers, including Internet Explorer? Here are a couple of ways to do that using CSS clip and clip-path.

    Read more →
  34. Responsive images, an HTML 5.1 standard

    It's official. Responsive images are a W3C recommendation since November 2016, featuring the brand new picture tag and new attributes for the img tag: srcset and sizes

    Read more →
  35. Responsive images? You don't need the picture tag

    Say you have a responsive website layout where images are sized at 100% of the container, but the container is not always as wide as the viewport. Do we need to use the picture tag, or the img tag is enough?

    Read more →
  36. Lazy load of responsive images with srcset and LazyLoad

    It's now possible to have lazy loading on responsive images to make our images to adapt to users screens and keep our website fast. In this article, we'll see what markup we need to write and which Javascript libraries we're gonna need to do that.

    Read more →
  37. Advanced sprite generation using Compass (SASS)

    Spriting is a way to improve performance in your website by putting many images (or icons) in a single larger image, in order to make a single HTTP request instead of many. Here's how you can make sprites using Compass.

    Read more →
  38. A new LazyLoad to improve your website performance

    In the latest days I've been working on websites performance optimization and I realized that there is no way to take advantage of the progressive JPEG image format on websites if you're using jQuery_lazyload from Mika Tuupola, so I decided to write my own lazy load, which turned to be better for multiple reasons.

    Read more →
  39. CSS 3 only spinning "loading" animation

    We used GIF images to create animations for years, but they aren't pretty to be used over gradients or pictures (no alpha channel, no anti-aliasing) of which modern web sites are full. There are many workarounds to animate PNG images instead, but...

    Read more →