
Code splitting with React.lazy and Suspense
The React.lazy method makes it easy to code-split a React application on a component level using dynamic imports. Use it along with Suspense to show appropriate loading states to your users.
904 articles from web.dev.

The React.lazy method makes it easy to code-split a React application on a component level using dynamic imports. Use it along with Suspense to show appropriate loading states to your users.


Learn how to use the Network Information API to adapt your content based on the network quality.

Learn best practices for address forms.

In this codelab, learn how to load completely different images based on device display size.

Learn how to build a responsive slide out side navigation layout component.

Learn how to build an experience similar to Instagram Stories on the web.

How to implement a resilient search experience with Workbox, using Background Sync and the Push API.

Learn 5 different centering techniques with CSS.

In this codelab, learn how to improve the performance of a simple application through code splitting.

In this codelab, learn how to use density descriptors and srcset to load images with the right pixel density for the user's device.

In this codelab, learn how to inerpret network traffic using Chrome's DevTools.

Learn how use Critical to extract and inline critical CSS, and improve render times.

In this codelab, learn how to track down a sneaky 404 that may prevent your page from being properly indexed.

In this codelab, learn how to control resource caching behavior using HTTP headers.

In this codelab, learn how to use imagemin with webpack to optimize JPEG and PNG images for faster download.

In this codelab, learn how to make a site installable using the beforeinstallprompt event.

In this codelab, learn how to request user permission and send notifications.

In this codelab, learn how to build a push notifications server.

In this codelab, learn how to manage notifications with a service worker.

Learn about techniques for optimizing slow third-party resources with some help from Lighthouse.

Learn best practices for payment forms.

In this codelab, learn how to improve the performance of a page by preloading and prefetching resources.

In this codelab, learn how to improve the performance of a page by preloading web fonts.

In this codelab, learn how to improve the performance of an application by removing any unused and unneeded dependencies.

In this codelab, learn how to improve performance by replacing an animated GIF with a video.

In this codelab, learn how the same-origin policy works when fetching resources.

In this codelab, learn how the same-origin policy works when accessing data inside an iframe.

In this codelab, learn how to serve images with the correct dimensions to improve network performance.

In this codelab, learn how to serve optimized images using WebP.

In this codelab, learn how to make an application reliable by registering a service worker.

Learn how to set performance budgets and keep your bundlesize in check with webpack.

Use cross-platform browser features to build a sign-in form that's secure, accessible, and easier to use.

Use cross-platform browser features to build a sign-up form that's secure, accessible, and easier to use.

In this codelab, learn how to use the sizes attribute to size images correctly depending on the user's viewport.

In this codelab, learn how both minifying and compressing the JavaScript bundle for an application improves page performance by reducing the app's request size.

In this codelab, learn how Brotli compression can further reduce compression ratios and your app's overall size.

Learn how to speed up future navigations by prefetching resources.

Learn to make your pages more accessible by improving your color and contrast usage.

Opt your pages in to theme-specific defaults of the user agent stylesheet, such as form controls, scroll bars, and system colors. This feature prevents browsers from applying any transformations on their own.

CommonJS modules are very dynamic, which prevents JavaScript optimizers and bundles perform advanced optimizations over them.

Community Guidelines

The mkbitmap C program reads an image and applies one or more of the following operations to it, in this order: inversion, highpass filtering, scaling, and thresholding. Each operation can be individually controlled and turned on or off. This article shows how to compile mkbitmap to WebAssembly.

HowTo Components




Many images can be heavily compressed, giving excellent performance improvements. This post helps you to choose the right level of compression to maintain the look of images while getting the best performance.

Serving desktop-sized images to mobile devices can use 2–4x more data than needed. Instead of a "one-size-fits-all" approach to images, serve different image sizes to different devices.


Constructable Stylesheets provide a seamless way to create and distribute styles to documents or shadow roots without worrying about FOUC.

Media files are a bit like onions. The file that you see in your operating system shell is only a container with multiple data streams and different allowable types of encodings.

This article provides a comprehensive overview of content delivery networks (CDNs). In addition, it explains how to choose, configure, and optimize a CDN setup.

When creating a layout using CSS, ensure you give the same experience for keyboard users as other users.

The CSS content-visibility property enables web content rendering performance benefits by skipping rendering of off-screen content. This article shows you how to use this new CSS property for faster initial load times, using the auto keyword. You will also learn about the CSS Containment Spec and other values for content-visibility that give you more control over how your content renders in the br

When building custom interactive components, use tabindex to ensure that they're keyboard accessible.

Third-party scripts, or "tags" can be a source of performance problems on your site, and therefore a target for optimization. However, before you start optimizing the tags you have added, make sure that you are not optimizing tags you don't even need. This article shows you how to assess requests for new tags, and manage and review existing ones.

Learn about how cookie notices affect performance, performance measurement, and UX.

Learn how to set up the opt-in-based isolated environment, called cross-origin isolated, with COOP and COEP.

How to ensure that the core functionality of your website is always available, accessible, secure, usable, discoverable, and fast.