WordPress · infra · fg-0085

Auto-redirect page hangs on phones because WP Rocket delays the redirect script

If you see Page sits on its 'Redirecting...' message for 13 to 15 seconds or forever, the cause and the fix for WordPress are below, last verified 2026-09-30.

Verified Sep 2026trust 50/100
Symptom
Page sits on its 'Redirecting...' message for 13 to 15 seconds or foreverscript type="rocketlazyloadscript" wraps the redirectAdding ?nocache= to the URL makes it redirect at once
Cause
Delay JavaScript Execution holds inline scripts until the visitor interacts. Its release events include mousemove, which touch devices never fire, so desktops self-rescue on any mouse twitch and phones on a page with nothing to tap wait indefinitely.
Fix
Exclude the script from delay with a marker string, and render a visible fallback link.
Apply
add_filter('rocket_delay_js_exclusions', function ($ex) { $ex[] = 'my-redirect-marker'; return $ex; }); then put /* my-redirect-marker */ inside the inline script
Affected
WP Rocket with Delay JavaScript Execution on, September 2026

Last verified 2026-09-30 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun