Interview Question

What is preload in HTML?

Preload fetches a known current-page resource early; use it only for important resources.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

Preload is a resource hint that starts fetching a resource needed by the current page earlier. • Use `<link rel="preload">` with the correct `as` value. • The page must still reference and use the resource normally. • Preloading too many files can compete with more important downloads.

💡 Simple Example

<head><link rel="preload" href="/fonts/site.woff2" as="font" type="font/woff2" crossorigin></head>

⚡ Quick Revision

Preload fetches a known current-page resource early; use it only for important resources.