Code snippets
How to Prevent Page Flicker in an A/B Test
★★★ Technical level 3 of 3
Written by Neil Webley · Last updated
Temporarily hide a page while variant changes are applied.
What you need to know
Use the Hide Page snippet early to reduce a flash of the original experience. Always pair it with Reveal Page and a safety timeout.
How to use it safely
Keep the hidden period short. QA on a throttled connection, confirm errors cannot leave a blank page and keep consent controls visible.
Before publishing
- Use Staging to test control and every variant.
- Check matching and non-matching locations.
- Verify mobile, desktop, accessibility and analytics behaviour.
- Ask someone else to review the setup.