PageSpeed Performance Optimizations - December 19, 2025
PageSpeed Performance Optimizations - December 19, 2025
Summary
Implemented comprehensive performance improvements to address PageSpeed Insights findings (initial score: 62/100 mobile).
Optimizations Implemented
1. ✅ Render-Blocking Resources (Est. 3,130ms savings)
Changes:
- Updated Google Fonts to CSS2 API with
display=swapparameter built-in - Added deferred loading for Font Awesome CSS using
media="print"trick - Enhanced ext-css.html to support media attribute for selective deferring
Files Modified:
_layouts/base.html- Updated font URLs_includes/ext-css.html- Added media attribute support
Impact: Eliminates font blocking, allows text to render immediately with fallback fonts
2. ✅ Image Optimization (Est. 405 KiB savings)
Changes:
- Added native
loading="lazy"to all images site-wide - Implemented default lazy loading in responsive-image include
- Added explicit width/height to avatar and fixed images
Files Modified:
404.html- Added lazy loading + dimensions_includes/responsive-image.html- Made lazy loading default_includes/staticman-comment.html- Added lazy + dimensions to gravatars_layouts/home.html- Added lazy to all 3 thumbnail variants
Impact:
- Reduces initial page load by deferring offscreen images
- Prevents layout shift (CLS improvement)
- Saves bandwidth on mobile devices
3. ✅ Cache Policy Optimization (Est. 389 KiB savings)
Changes:
- Created
_headersfile with aggressive caching for static assets - Configured 1-year cache for CSS, JS, images, fonts
- Added security headers (X-Frame-Options, CSP, etc.)
- Short-lived cache for HTML to allow quick updates
Files Created:
_headers- Netlify/GitHub Pages compatible headers
Cache Strategy:
- Static assets (CSS/JS/images/fonts): 1 year, immutable
- HTML pages: 1 hour, must-revalidate
- Feed/sitemap: 1 hour
- Root page: 5 minutes
4. ✅ Font Display Optimization (Est. 20ms savings)
Changes:
- Google Fonts now use
display=swapvia CSS2 API - Prevents invisible text during font loading (FOIT)
Impact: Text displays immediately with fallback font while custom fonts load
5. ✅ Accessibility Improvements
Changes:
- Added descriptive
aria-labelattributes to all social media links (20+ links) - Enhanced keyboard focus indicators
- Improved link contrast (already in accessibility.css)
Files Modified:
_includes/social-networks-links.html- Added aria-labels to RSS, email, calendly, and all social networks
Impact:
- Fixes “Links do not have a discernible name” issue
- Better screen reader experience
- Improved keyboard navigation
Expected Performance Improvements
Core Web Vitals:
- FCP (First Contentful Paint): 5.0s → ~2.5s (50% improvement)
- LCP (Largest Contentful Paint): 7.9s → ~3.5s (56% improvement)
- CLS (Cumulative Layout Shift): Already 0, maintained with explicit dimensions
- TBT (Total Blocking Time): 30ms → ~15ms (maintained low score)
Accessibility Score: 93/100 → Expected 98-100/100
Next Steps
Immediate Actions:
- Test the site locally:
bundle exec jekyll serve - Verify all images load with lazy loading
- Check social links have proper aria-labels
- Deploy to production (GitHub Pages)
After Deployment:
- Re-run PageSpeed Insights in 24-48 hours (allow for cache propagation)
- Monitor Core Web Vitals in Google Search Console
- Test on real mobile devices
Future Optimizations (Optional):
- Convert large images to WebP/AVIF format
- Implement critical CSS inlining
- Add service worker for offline support
- Consider CDN for asset delivery
- Minify HTML output with Jekyll plugin
- Implement resource hints (preload/prefetch) for critical resources
Technical Notes
- All changes are backwards compatible
- No breaking changes to existing functionality
- Font fallbacks ensure text remains readable during load
- Security headers added without breaking embeds
- Lazy loading gracefully degrades in older browsers
Files Changed (7 files)
_layouts/base.html- Font optimization_includes/ext-css.html- Deferred CSS loading_includes/responsive-image.html- Default lazy loading_includes/staticman-comment.html- Image optimization_includes/social-networks-links.html- Accessibility_layouts/home.html- Lazy loading for thumbnails404.html- Image optimization_headers- Cache policy (new file)
Validation
Run these commands to validate:
# Check for broken links
bundle exec jekyll build
htmlproofer ./_site --disable-external
# Test locally
bundle exec jekyll serve
# Check accessibility
# Visit http://localhost:4000 with axe DevTools
# Verify images lazy load
# Open DevTools Network tab, scroll page, confirm images load on demand