Self-Healing Delay JS: Automatic Real-Browser Visual Locks (Pro)
Enable automatic real-browser CSS geometry locks for delayed carousels, entrance animations, preloaders, and collapsed slots across Desktop & Mobile in WP Admin, KadiCache Pulse, and AI MCP.
- Toggle Self-Healing Delay JS ON in
WP Admin -> KadiCache -> CSS & JavaScript(or inside KadiCache Pulse underCSS & JavaScript) on any connected KadiCache Pro site. - Learns real pre- vs post-Delay geometry in real visitor browsers via HMAC-signed
POST /wp-json/kadicache-pro/v1/browser-hintswithout consuming Cloud Pro worker quota. - Applies 4 universal pure-CSS geometric locks (
carousel,reveal,hide,height) scoped to Desktop (>=768px) and Mobile (<=767px), patching cached HTML in place with 0 cache purges. - Auto-releases locks via
delay.jstier-2 handoff once delayed scripts initialize, and resets on theme switch, post edit, or 1-click Reset learned data.
Enabling Self-Healing Delay JS in WP Admin, Pulse & AI MCP#
Self-Healing Delay JS (kadicache_pro_local_delay_locks) is a KadiCache Pro feature powered 100% locally by real visitor browsers. Follow these three steps to enable it:
- Connect KadiCache Pro: Ensure
KadiCache Prois installed and paired underWP Admin -> KadiCache -> Cloud Connection(paid Pro seat or 7-Day Free Trial). - Select
Delay Until Interaction: OpenWP Admin -> KadiCache -> CSS & JavaScriptand set JavaScript Loading Strategy to Delay Until Interaction (delay_js_enabled). - Toggle
Self-Healing Delay JSON: In the same JavaScript Execution & Minification card, switch Self-Healing Delay JS ON and click Save Changes.
You can also govern the exact same toggle remotely from KadiCache Pulse -> CSS & JavaScript -> Self-Healing Delay JS (pro_delay_locks_enabled), or via AI MCP:
{
"action": "configure",
"toggles": { "delay_locks": true }
}How Real-Browser Self-Healing Works (2-Visit Lifecycle)#
| Phase | What Happens Inside WordPress & the Browser | Network / Cache Overhead |
|---|---|---|
| Visit #1 (Learning Visit) | On an unlearned page with delayed scripts (data-kadicache-delay), BrowserHintsRewriter.php stamps deterministic data-kc-b container markers and loads local-vitals-beacon.js. When a real visitor interacts (tap, scroll, mousemove), the beacon diffs pre-Delay vs post-Delay geometry and posts a signed HMAC payload to /wp-json/kadicache-pro/v1/browser-hints. | 1 tiny same-origin JSON beacon per viewport (bots, HeadlessChrome & Lighthouse ignored) |
| In-Place Cache Patch | BrowserHintsEndpoint.php validates the HMAC signature, saves sanitized locks into wp_kadicache_pro_browser_hints (delay_json), and patches the existing disk cache HTML in place via kadicache_patch_cached_html. | 0 cache purges (instant update) |
| Visit #2+ (Healed Delivery) | BrowserHintsRewriter.php removes local-vitals-beacon.js completely and injects <style id="kadicache-local-delay-css" data-kadicache-layout-tier="2"> scoped per @media (min-width:768px) and @media (max-width:767px). Once delayed scripts initialize on interaction, delay.js removes the lock stylesheet cleanly. | 0 bytes JS · Pure CSS at 0 ms |
What Self-Healing Delay JS Fixes Automatically vs Honest Limits#
Automatically fixed across themes & builders (pure geometry, zero class hardcoding):
- Multi-column & single-slide carousels (Slick, Swiper, Owl Carousel, Splide, Flickity, WooCommerce product carousels, Elementor/WPBakery sliders) — renders exact Desktop and Mobile column counts at
0 msand hides overflow slides while preventing::before/::afterclearfix grid column theft. - Invisible entrance animations (
opacity: 0,visibility: hidden, slide-up/zoomtransformfrom AOS, GSAP, Salient, Elementor) — reveals hero headings and above-the-fold cards immediately at0 ms. - Stuck loading spinners & page preloaders — hides temporary JS preloaders while protecting off-screen mobile drawers and hover mega-menus.
- Collapsed
0pxwidget/ad slots — reserves exact measured post-JSmin-heightto prevent vertical CLS shifts.
When to pair with another KadiCache control:
- Hero images using JS
data-srclazy-loading: Enable Pro Local Improve LCP so the real above-the-fold hero image is de-lazied and preloaded directly in HTML. - Scripts that must run at
0 mswithout waiting for interaction (e.g., live calculators, instant chat triggers, or JS-only remote embeds): Add the script handle or inline keyword to Delay JavaScript Exclusions (delay_js_exclusions) or exclude specific paths viadelay_js_excluded_paths.
Frequently Asked Operational Questions
Why does Self-Healing Delay JS show as locked in KadiCache Pulse on my Free site?
Why did my first test visit in PageSpeed Insights or Playwright not generate lock CSS?
Does clearing KadiCache page cache wipe my learned Self-Healing Delay JS locks?
Does Self-Healing Delay JS obey Delay JavaScript Excluded Paths?
Creator of KadiCache’s Early PHP Drop-In, 7-Driver Object Cache Engine, Cloud Remove Unused CSS, and Zero-CLS Lazy Render pipeline.