02 / 06

What is the purpose of <link rel="preload">?

Preloading Resources in HTML

The <link rel="preload"> element is used to tell the browser to fetch a resource (like a script, stylesheet, font, or image) early, before it is actually needed. This helps improve page load performance by loading critical resources sooner.

Key Points About Preload
  1. 1

    Preloading allows the browser to prioritize fetching important resources.

  2. 2

    Useful for fonts, scripts, stylesheets, or images that are critical for rendering above-the-fold content.

  3. 3

    Requires specifying the as attribute to indicate the type of resource (script, style, image, font, etc.).

  4. 4

    Helps reduce render-blocking delays and improve perceived page speed.

Example Usage

In short: Use <link rel="preload"> to instruct the browser to fetch important resources early, improving page rendering speed and user experience.