Rich-text Reply

Optimizely Render-blocking JavaScript

theenergycell 08-23-16

Optimizely Render-blocking JavaScript

Hi there,

We are using the Magento Optimizely extension and Google PageSpeed Insights is reporting that the script is 'render-blocking javascript'.

 

Is there anything we can do here? The script seems to be added right after the opening <head> tag.

robertchan 08-23-16
 

Re: Optimizely Render-blocking JavaScript

Verbatim from Google - "scripts that are not critical to initial render should be made asynchronous or deferred until after the first render." The only issue with something like a deferral is that you run the risk of page flashing. Strictly abiding by Google's recommendation may lead to unexpected issues in Optimizely's performance.
Robert Chan

Experimentation Hero

Re: Optimizely Render-blocking JavaScript

Thanks @robertchan. I can modify the official magento extension to make it async, but will this affect our experiments on mobile?

 

It's currently affecting the site anyway as it is.

robertchan 08-24-16
 

Re: Optimizely Render-blocking JavaScript

Anytime, and it should have the same effect as it does on desktop.
Robert Chan

Experimentation Hero