Fonts Optimization in SPC
Overview
The Font Optimization module in Super Page Cache helps improve site performance by optimizing how fonts, especially Google Fonts, are loaded. It reduces the number of HTTP requests and minimizes render-blocking behavior caused by external font files.
Optimizing font delivery is especially important for improving Core Web Vitals like First Contentful Paint (FCP) and Largest Contentful Paint (LCP).
How to Enable Font Optimization
To configure font optimization in Super Page Cache:
Go to Super Page Cache → Settings → Files
Enable one or both of the following options:
- Optimize Google Fonts
- Local Google Fonts
These settings work independently or in combination depending on your preference and site setup.
Feature Overview
1. Optimize Google Fonts
- What it does:
- Detects multiple Google Font requests and combines them into a single request or a single stylesheet, depending on how the fonts are loaded.
- Reduces DNS lookups, network latency, and render-blocking CSS.
- Impact:
- Decreases the number of HTTP requests.
- Speeds up font loading.
- Reduces layout shifts and improves performance grades in tools like PageSpeed Insights and GTmetrix.
- Available Options:
- Yes: Enable combining Google Fonts into one request.
- No: Leave fonts loaded individually via default behavior.
2. Local Google Fonts (Self-Host)
- What it does:
- Automatically downloads Google Fonts used on your site and serves them directly from your own server (i.e., your domain).
- Rewrites font requests in your theme’s stylesheets to use the locally hosted versions.
- Impact:
- Eliminates reliance on Google’s external servers.
- Increases privacy compliance (e.g., GDPR), especially in regions where loading fonts from Google servers may raise legal concerns.
- Reduces third-party DNS lookups and improves site consistency and speed.
- Available Options:
- Yes: Enable downloading and serving Google Fonts locally.
No: Continue using Google’s CDN for font delivery.
Best Practices
- For best performance and legal compliance, it is recommended to enable both:
- Optimize Google Fonts: Reduces the number of external requests.
- Local Google Fonts: Ensures fonts are hosted on your server and eliminates third-party dependencies.
- Always clear your site’s cache and regenerate critical CSS after enabling font optimization.
Important Notes
- Font optimization applies only to Google Fonts. Custom or third-party fonts from Typekit or other sources are not affected.
- Some themes and page builders load fonts dynamically or inline. Ensure your theme follows best practices for enqueueing fonts via wp_enqueue_style() for full compatibility.
✅ Benefits of Font Optimization
- Faster page rendering and reduced LCP times
- Fewer external HTTP requests
- Improved privacy compliance
- Better scores in performance testing tools
If you’re unsure whether font optimization is active on your site or want help analyzing your font delivery strategy, feel free to contact our support team — we’re here to help.
Congratulations! You've successfully optimized your site's fonts with the help of Super Page Cache.