The only A/B testing tool that won't slow down your website performance. Get started for free.
Get started for FREE
No-code. Free forever.
CONTENTS
Question
5
Min read

Does Anti-Flickering Script Slow Down My Website?

Donald Ng
October 31, 2023
|
5-star rating
4.8
Reviews on Capterra

Your website speed and performance should always be the top priorities, as they can directly have an impact on your website conversion rates and SEO ranking.

When it comes to A/B testing, one question that comes up often is whether adding an anti-flickering script will slow down a website.

In this post, I'll explain what an anti-flickering script is, how it works, its impact on site speed, and some best practices around using it.

What is An Anti-Flickering Script?

An anti-flickering script, sometimes called an A/B testing script, is code that removes the visual "flicker" or flash that can occur when you run an A/B test on your website.

Here's what happens when you set up an A/B test without an anti-flickering script:

  1. A user visits your website.
  2. The A/B testing tool loads the original page (version A).
  3. Once the A/B testing script loads, it swaps version A for version B.
  4. This swap is visible to the user, causing a distracting visual flicker between page versions.

Here is an example of how a "flicker" looks like:

"Hello World" flickers and changed to "Hello World V2"

The anti-flickering script eliminates this flash by delaying showing the page to the user until the correct version has loaded.

So in practice, it works like this:

  1. A user visits your website.
  2. The anti-flickering script shows a blank page while the A/B test determines which version (A or B) to display.
  3. Once the test assigns the version, the full page content loads seamlessly without any flicker between page versions.
The page starts with a blank page and is loaded with V2 no flickering

What if the A/B testing tool took 10 seconds to load?

Usually, an anti-flickering script has a timeout setting that you can configure if the A/B testing script for whatever reason, is missing from the page or did not load within XX seconds (no more than 2 seconds) then it will release the page by removing the blank page.

This results in a smoother user experience.

HOLD UP!

So, you're purposefully delaying the page with a blank page UNTIL the A/B testing determines which version to use? Doesn't it impact the page speed?

How Does Anti-Flickering Script Affect Page Speed?

The impact of the anti-flickering script depends primarily on how quickly your A/B testing script can run to determine the page version.

There are a few speed considerations:

  • The blank page time: This is the amount of time the blank page displays while the A/B test determines the version. The shorter this time period, the less impact on speed.
  • Waterfall speed: Most A/B testing tools load asynchronously to avoid blocking other page elements from loading. However, the anti-flickering script will delay displaying the full page until the A/B test finishes running.
  • Geography: The location of the A/B testing tool server can cause latency based on the user's geography. More distance means slower run time.
  • Server load: Heavy load on the A/B testing servers will also slow down script execution time.

So in summary, a fast running A/B testing script will minimize the blank page time and speed impact of the anti-flickering script. Slower scripts can delay when the full page displays, hurting site speed metrics like Time to First Byte.

As you can see from the example above, with a fast A/B testing script with an anti-flickering script built-in the page shows up within 0.63s. On the flip side, if the A/B testing script is slow, it doesn't matter if you have an anti-flickering script or not, it will most certainly hurt your website conversions.

Best Practices for Anti-Flickering Script

Based on the speed considerations, what are some best practices around using anti-flickering scripts?

  • Only use it when testing Above The Fold (ATF). Activate only on pages that are changing elements on ATF, you don't need an anti-flickering script if your test is below the fold as users will never notice the flickering effect.
  • Only use it when flickering is highly noticeable or distracting. For subtle page changes, the script may not be necessary.
  • Choosing a FAST A/B testing tool. Faster running tools minimize impact and improve your overall website performance. Work with your vendor if necessary.
  • Decrease geography latency. Use a CDN to distribute the A/B testing scripts geographically.

In Conclusion

Anti-flickering scripts can provide a better user experience by eliminating distracting flashes during A/B tests. However, they can delay displaying page content based on how quickly the A/B testing tool assigns the version.

With a well-optimized implementation, you can benefit from anti-flickering scripts without sacrificing website speed or performance.

A/B testing platform for people who cares about website performance

Mida is 10X faster than everything you have ever considered. Try it yourself.