Browser & Web Performance · Middle · Question 32 of 75
Why must a preloaded font have the crossorigin attribute?
<link rel="preload" href="/fonts/inter.woff2" as="font" type="font/woff2" crossorigin>- 1It allows the font to be used by other websites
- ✓Correct answer: Fonts are fetched in CORS mode; without it the preload doesn't match the real request and the font downloads twice
- 3Without it the font can't be cached
Explanation
This is needed even for same-origin fonts. A mismatch shows up as an 'unused preload' warning in the console.