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-27 20:07:09 -06:00
2025-11-28 21:00:00 -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 12:08:10 -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 23:46:38 -06:00
2025-11-27 16:00:57 -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-26 22:55:31 -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