Smart JS Deferring, Unused Asset Unloader, Tracker Delay & Guest Page Cache
Reduce Total Blocking Time (TBT) and Server TTFB with dependency-aware JS deferring, WooCommerce Block Cart/Checkout protection, post-render unused plugin unloading, tracker delay, guest disk caching, and 1-Click Cache Purge.
📋 On This Page (Jump to Section)
Continuing inside Module 1 (Asset & Core Web Vitals Optimizer), this guide covers JavaScript execution optimization, post-render unused asset stripping, third-party analytics interaction delay, the Ultra-Light Guest HTML Disk Page Cache, and the universal 1-Click Purge Cache engine.
1. Safe Dependency-Aware JS Deferring (WooCommerce Blocks Safe) #
Blindly adding defer to every script breaks interactive checkouts whenever a parent script has synchronous inline children. FBS Secure Optimize (upgraded in v3.0.1) uses recursive dependency graph verification:
- Recursive
WP_ScriptsDependency Graph Guard: Before deferring any script handle,is_script_handle_safe_to_defer()inspects the handle and its entire dependency tree for dependent inline scripts or non-deferrable children. - WooCommerce Block Cart, Block Checkout & Core Runtime Protection: Automatically protects
@wordpress/*(wp-*) and WooCommerce (wc-*) packages and enforces automatic bypass on transactional Cart, Checkout, My Account, and Mini-Cart flows so React/Interactivity API hydration never encounters dependency order inversion. - Smart Inline-Verified
jQueryDeferring (v3.0+): Inspects the rendered HTML for synchronous inline scripts referencingjQueryor$. When no unsafe inline dependency exists (even when WordPress Core outputs its benignjQuery.uiBackCompat = false;bootstrap snippet, which FBS safely wraps in aDOMContentLoadedcallback),jquery-coreandjquery-migrateare safely deferred out of the critical rendering path!
2. Smart Post-Render Unused Plugin CSS/JS Unloader #
Many WordPress plugins load their CSS and JS on every single page of your site even when their shortcode or form is only used on /contact/. FBS Secure Optimize inspects the complete rendered HTML document (including headers, popups, widgets, and footers) before stripping unused assets:
- Contact Form 7 & Orphaned Form Badge Scripts: On pages with zero CF7 forms (and zero other form plugins), strips CF7 stylesheets/scripts, dequeues heavy unused third-party form-protection badge scripts, and cleans up orphaned
wp-polyfill/wp-i18n/wp-hooksscripts if no other active handle requires them. - Conditional Unloading for Popular Plugins: Safely strips unused WPForms, Smash Balloon Instagram Feed, TablePress, Slick Carousel, and unused Gutenberg Block social-links inline CSS on pages where those components are absent.
3. Delay External & Inline Third-Party Trackers (TBT / INP Booster) #
External tracking pixels often add 400–900 ms of Total Blocking Time (TBT) on mobile devices. When Delay Third-Party Trackers is enabled:
- Captures both external
<script src="...">tags and inline bootstrap snippets for Google Tag Manager (GTM), Google Analytics 4 (gtag.js), Microsoft Clarity, Meta / Facebook Pixel, Hotjar, LinkedIn Insight, TikTok Pixel, and background form-badge scripts. - Defers download and execution until the visitor’s first interaction (
pointerdown,mousemove,touchstart,scroll, orkeydown) or a clean post-load idle fallback. - Transactional Safety: Automatically bypassed on WooCommerce Cart, Checkout, and Account pages so conversion attribution pixels fire immediately.
4. Ultra-Light Guest HTML Disk Page Cache #
If your hosting stack does not already run a server-level page cache, toggle on Enable Guest HTML Disk Page Cache (or click the ⚡ Apply Max PageSpeed Preset button):
- Sub-50ms Static HTML Delivery: Saves rendered HTML pages for logged-out visitors inside
wp_upload_dir()/fbs-optimize-cache/and serves them with anX-FBS-Cache: HITresponse header. - Ad-Campaign UTM / GCLID / FBCLID Cache-Hit Support: Normalizes marketing tracking query strings (
utm_*,gclid,fbclid,msclkid) so paid ad clicks still hit the warm HTML cache without generating duplicate files. - Automatic Host Cache Conflict Bypass: Automatically yields if it detects LiteSpeed Cache, WP Rocket, W3 Total Cache, SiteGround Optimizer, WP Fastest Cache, or 20i
StackCacheactive on the server.
5. 1-Click Universal “Purge Cache” (20i / LiteSpeed / PHP-FPM Safe) #
Click Purge Cache in the WordPress Top Admin Bar (#wp-admin-bar-fbsseop-toolbar) or inside the FBS Optimize header anytime you update styles or content:
- Clears FBS inlined/de-blocked CSS transients, LCP hero CSS caches, image CLS dimension caches, and the Guest HTML Disk Page Cache.
- Flushes the WordPress Object Cache (Redis / Memcached) and triggers compatible cache purge hooks across LiteSpeed Cache, WP Rocket, W3 Total Cache, WP Fastest Cache, WP Super Cache, Autoptimize, SiteGround, Breeze, and WP Engine (wrapped in output buffering for clean redirects).
- Zero Shared-Host PHP Worker Lockouts (v3.0+): Never invokes
opcache_reset()during settings saves or cache purges—preventing PHP-FPM worker lock contention, 20i/StackCP HTTP429 Too Many Requestsflood blocks, and blankadmin-post.phpscreens.