I have minified JS and CSS and optimized images. Used async="async"
in js where it is applicable. How to fix "Eliminate render-blocking JavaScript and CSS in above-the-fold content"
Any Ideas?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI have minified JS and CSS and optimized images. Used async="async"
in js where it is applicable. How to fix "Eliminate render-blocking JavaScript and CSS in above-the-fold content"
Any Ideas?
You have to add async
and defer
attributes to your js params.
So go to: app/design/frontend/{package}/{theme}/layout/page.xml
if you haven't it copy it from app/design/frontend/base/default/layout/page.xml
Replace :
<action method="addJs"><script>prototype/prototype.js</script></action>
With :
<action method="addJs"><script>prototype/prototype.js</script><params>defer</params></action>
<action method="addJs"><script>prototype/prototype.js</script><params>async</params></action>