Skip to content
Aa

JavaScript challenge

Choose automatic browser verification when visitors should continue without a human-verification task. The load balancer’s js_challenge is host-wide: /challenge is a test path, not a path selector. Use the custom page to explain the wait.

Visitor message: Please wait while your browser is verified.

The load balancer’s js_challenge.custom_page supplies the message. In this example, cookie_expiry is 300 seconds and js_script_delay is 1000 milliseconds. Keep F5’s verification script intact when customizing the page. A returning visitor with an accepted cookie may not see the challenge again.

To verify selected traffic instead, see Conditional challenges. For an interactive human check, see CAPTCHA verification.

JavaScript challenge source

{
"spec": {
"js_challenge": {
"cookie_expiry": 300,
"custom_page": "string:///PHA+UGxlYXNlIHdhaXQgd2hpbGUgeW91ciBicm93c2VyIGlzIHZlcmlmaWVkLjwvcD4=",
"js_script_delay": 1000
}
}
}

Decoded preview (escaped):

<p>Please wait while your browser is verified.</p>

Expected result: In a fresh browser session, the visitor sees the message, completes verification, and reaches the application. With an accepted cookie, a repeat request normally reaches the application without another challenge. Clear the cookie to test the first visit again.

Verified live example: Open the JavaScript challenge. A fresh browser sees the custom message, completes verification, and reaches the synthetic origin.