Delay, defer and combine settings
Script Optimizers Breaking Testimonial Widgets
Speed plugins rewrite script tags. WP Rocket can hold every script until the visitor moves or taps, Cloudflare’s Rocket Loader defers all JavaScript until after rendering, and Autoptimize gathers scripts into bundles. The StoryProof embed script is already async, so most of that rewriting adds nothing and can leave an empty box until someone scrolls. Each tool has a documented way to leave one script alone.
- Spot which optimizer touched the script
- The exclusion setting in each tool
- Retest the way a first visit sees it
The problem, solved
How optimizers trip up an embedded widget
Situation 1 of 5
Testimonials appear only after I scroll
WP Rocket’s Delay JavaScript execution holds scripts until the first interaction, such as a mouse move, touch, scroll or key press. Until then the widget box is empty.
How StoryProof solves it
The embed loads a single script from app.storyproof.io, so add storyproof or the embed.js address to Excluded JavaScript Files, or add the nowprocket attribute to that script tag.
Situation 2 of 5
Rocket Loader broke the widget
Cloudflare documents that Rocket Loader defers all JavaScript until after rendering, inline and external alike.
How StoryProof solves it
Edit the StoryProof script tag so data-cfasync="false" comes before the src attribute. Cloudflare says the attribute must sit in the tag, not inside the script.
Situation 3 of 5
Combining scripts swallowed the embed
Autoptimize and similar tools merge scripts into bundles and can reorder or drop what they cannot handle.
How StoryProof solves it
Add storyproof to the plugin’s JavaScript exclusion list. Do not add it to an async field: the embed script already carries async.
Situation 4 of 5
The div is there, the script is not
Some setups strip or move a script pasted into a content block while leaving the div untouched.
How StoryProof solves it
Load embed.js once in the theme footer or a header and footer plugin, outside the content the optimizer rewrites. One copy fills every StoryProof div on the page.
Situation 5 of 5
It works for me, not for visitors
WP Rocket applies delay only to cached or optimized pages, and admins often see unoptimized pages while logged in.
How StoryProof solves it
Test in a private window with no login. The embed is plain HTML and a script, so if it shows there after an exclusion, the optimizer was the cause.
Checklist
Exclude the embed script from each optimizer
Tick only the groups for tools you run. Change one setting, clear that tool’s cache, then retest before moving on.
Ticks stay in this browser tab. Nothing is sent anywhere.
Symptom and the setting behind it
In StoryProof
Fix it without losing your speed settings
- 1
Reproduce it logged out
Load the page in a private window and wait ten seconds without touching anything.
- 2
Exclude only the embed script
Add the exclusion for the tool you identified. Keep every other optimization on.
- 3
Move the script out of content if needed
If the script keeps disappearing from a content block, load it once in the footer instead.
- 4
Clear caches and retest
Clear the optimizer’s cache and any CDN cache it controls, then repeat the private window test.
What happens next: Note the exclusion in your site documentation. Plugin migrations and setting resets are the usual way it comes back.
Before you start
What this page does not claim
Settings as of 2026-11-14
Setting names follow the WP Rocket, Cloudflare and Autoptimize docs read on 2026-11-14. Plugins rename options between versions.
Not tested per plugin
StoryProof has not tested its embed against each optimizer and version. The steps rely on each vendor’s documented exclusion.
Nothing about StoryProof caching
This page makes no claim about how StoryProof caches its script or data. It deals only with what your site’s tools do to the tag.
Other optimizers
LiteSpeed Cache, Perfmatters and others have similar delay features. Look for their script exclusion setting and use the same keyword.
Speed score trade off
WP Rocket warns that excluding files from deferral can make PageSpeed tools complain. The embed is async, so the real cost is usually small; measure it.
FAQ
Questions people ask
Short answers to what usually comes up next.
Is it safe to exclude one script from delay?
Yes, in the sense that every other script keeps its optimization. You are only telling the tool to leave the StoryProof tag as written.
Which keyword should I use for the exclusion?
storyproof matches the script’s address on app.storyproof.io and nothing else on a typical site. Use the full embed.js URL if your tool wants a file path.
Why not just add the widget script to the optimizer’s async list?
It is already async. Some tools treat that list differently from a plain exclusion, and the Autoptimize FAQ itself warns the async option can break pages.
Will delaying the widget help my Core Web Vitals?
Possibly a little, but visitors may never see the proof. The page speed guide explains how to measure the widget’s real cost before deciding.
Still have a question? Ask the StoryProof team or book a demo.
Fast pages and visible proof
One async script fills every widget on the page. Keep it out of the optimizer’s queue.
Sources
- Delay JavaScript execution, WP Rocket. Checked 2026-11-14.
- Load JavaScript deferred, WP Rocket. Checked 2026-11-14.
- Rocket Loader, Cloudflare Docs. Checked 2026-11-14.
- Ignore JavaScripts, Cloudflare Docs. Checked 2026-11-14.
- Autoptimize plugin page and FAQ, WordPress.org. Checked 2026-11-14.
Last updated 2026-11-14.