Search⌘ K
AI Features

Prefetching & Preloading Resources

Explore how to optimize web loading speed through prefetching resources, DNS prefetching to reduce domain lookup time, and prerendering pages. Understand when and how to use these techniques to enhance user experience by minimizing wait times for assets and pages, ensuring smoother navigation.

Prefetching something is requesting it ahead of time. A good analogy would be ordering extra pizza for a birthday party in case some extra guests choose to show up. The pizza may eventually not be needed, but you still have it just in case. That’s exactly how prefetching works on websites. There are a few kinds of prefetching. Let’s discuss each.

Asset / link prefetching

Assets that may eventually be needed can be preloaded using the HTML ...