We recommend that the compose scripts are installed directly in the <head> tag of each page, so that redirects can run before the page is rendered. If the page begins to show before the redirects can happen, then visitors will see the page “flicker” when the Compose script is run that hides the current page and shows them a variant.
We also recommend that scripts be loaded synchronously to help prevent the flicker issue. Read more about synchronous loading here.