There are 2 ways that code snippets for A/B testing can be loaded: Synchronous and Asynchronous.
Synchronously means that one script is loaded at a time starting from the <head> tag down. Each script is completed before the next one begins. Visitors will see a blank page until all the scripts in your <head> tag are loaded, then the body will begin to render. Synchronous loading what is done as the default.
Here you can see that each block represents a script being loaded. With synchronous loading, there is a waterfall effect where the scripts are loaded sequentially with the next one starting after the previous finished.
Asynchronously means that some scripts can be loaded at the same time. You can override the scripts to load asynchronously to load pages quicker, but it’s not recommended for A/B testing as it can cause a “flicker” effect on the webpage.
Here we have an example of asynchronous loading, where the first 2 scripts are loaded at the same time.
With an asynchronous load, you run the risk of showing the body of the page before the Compose script has a chance to run. Visitors may see the original page before the Compose script is able to redirect to or show the variant. This could cause confusion and a poor user experience for your visitors, as well as compromise test results.