FrankZamora
d5a2fd2702
perf: defer Bootstrap CSS with critical subset inline
- Created Assets/css/critical-bootstrap.css (~10KB subset)
Contains only Bootstrap classes used in above-the-fold components:
container, navbar, flexbox, dropdown, spacing utilities
- Created CriticalBootstrapService (singleton)
Injects minified critical Bootstrap in <head> at priority 0
Output: <style id="roi-critical-bootstrap">...</style>
- Modified enqueue-scripts.php
Bootstrap now loads with media="print" + onload="this.media='all'"
Full 31KB Bootstrap loads async, doesn't block rendering
- Updated CriticalCSSHooksRegistrar
Now registers both CriticalBootstrapService (priority 0)
and CriticalCSSService (priority 1)
Flow:
1. wp_head (priority 0) → Critical Bootstrap (~10KB inline)
2. wp_head (priority 1) → Critical Component CSS (~4KB inline)
3. Bootstrap full (31KB) loads deferred, non-blocking
Expected PageSpeed improvement: ~400-600ms LCP reduction
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 10:26:24 -06:00
..
2025-11-26 22:55:31 -06:00
2025-11-29 10:26:24 -06:00
2025-11-26 22:55:31 -06:00
2025-11-26 22:55:31 -06:00
2025-11-26 22:55:31 -06:00
2025-11-27 15:45:01 -06:00
2025-11-27 16:16:55 -06:00
2025-11-26 22:55:31 -06:00
2025-11-26 22:55:31 -06:00
2025-11-27 21:30:06 -06:00
2025-11-26 22:55:31 -06:00
2025-11-26 22:55:31 -06:00
2025-11-26 22:55:31 -06:00
2025-11-27 16:31:18 -06:00
2025-11-26 23:38:21 -06:00