Friday, January 1, 2016

Eliminate render-blocking JavaScript and CSS in above-the-fold content in Magento

To remove render-blocking JavaScript issue in Magento using layout xml directly simply add either <params>defer</params> or <params>defer</params> before </action> tag.

For example:

<action method="addJs"><script>prototype/prototype.js</script></action>

Replace it with following:

<action method="addJs"><script>prototype/prototype.js</script><params>defer</params></action>


<action method="addJs"><script>prototype/prototype.js</script><params>async</params></action>


chandra bhushan said...

Thanx sir

Dinesh Kumar said...

Thanks for sharing great information in your blog. Got to learn new things from your Blog . It was very nice blog to learn about Magento.

iFour Technolab Pvt Ltd said...

Great post with very useful information to all thanks for sharing with all of us. I like it very much.
eCommerce solution providers india

LW said...

This blog is very informative thanks for sharing such information with us.