font/woff2
Font

Overview

font/woff2 is the media type for Web Open Font Format 2.0 web fonts. With superior Brotli-based compression it shrinks files by roughly 30%+ over WOFF 1.0, making it the de facto standard web font format today.

Details

WOFF2 applies Brotli compression and font-specific preprocessing (transforms) to font outlines, making it substantially smaller than WOFF 1.0. Every modern browser supports it, so the standard pattern lists woff2 as the first @font-face source with woff as a fallback for very old browsers. It uses the top-level font type defined by RFC 8081.

In performance practice, web fonts easily become a rendering bottleneck. Preload critical fonts with `<link rel="preload" as="font" type="font/woff2" crossorigin>` (the crossorigin attribute is required for font preload), and use `font-display: swap` to show a fallback font immediately and eliminate the flash of invisible text (FOIT). Cross-origin serving needs CORS headers just like WOFF.

Syntax

e.g. Content-Type: font/woff2

File extensions

.woff2

Notes

Related types

Related headers