Resource Hints
Benefits
Configuration
pwa:
resource_hints:
enabled: true
auto_preconnect: true # Auto-detect origins from Workbox config
preconnect:
- 'https://api.example.com'
- 'https://cdn.example.com'
dns_prefetch:
- 'https://analytics.example.com'
preload:
- href: '/fonts/custom.woff2'
as: font
type: 'font/woff2'
- href: '/css/critical.css'
as: style
fetchpriority: high
- href: '/images/hero.webp'
as: image
media: '(min-width: 768px)'Usage
Hint Types
Preconnect
DNS Prefetch
Preload
Preload Attributes
Attribute
Description
Required
Asset Mapper Support
Input
Output
Auto-Detection
Workbox CDN
Google Fonts
HTTP Link Headers & Early Hints
How It Works
HTTP 103 Early Hints
Combining with Early Hints Feature
Best Practices
Example: Complete Configuration
Last updated
Was this helpful?