Skip to content

Magento Defer JavaScript

How I achieve 2.8s Load time in Magento as compare to 10s using the following In order to have Defer Javascript, Please change the following files page.xml, my page.xml is stored at…

Sohaib Khan1 min read
Magento Defer JavaScript — editorial illustration

How I achieve 2.8s Load time in Magento as compare to 10s using the following In order to have Defer Javascript, Please change the following files page.xml, my page.xml is stored at

PLAINTEXT1 line
/home/domain/public_html/app/design/frontend/base/default/layout/page.xml
HTML14 lines
<block type="page/html_head" name="head" as="head">
<action method="addJs">prototype/prototype.js<params>async</params></action>
<action method="addJs">lib/ccard.js<params>async</params></action>
<action method="addJs">prototype/validation.js<params>async</params></action>
<action method="addJs">scriptaculous/builder.js<params>async</params></action>
<action method="addJs">scriptaculous/effects.js<params>async</params></action>
<action method="addJs">scriptaculous/dragdrop.js<params>async</params></action>
<action method="addJs">scriptaculous/controls.js<params>async</params></action>
<action method="addJs">scriptaculous/slider.js<params>async</params></action>
<action method="addJs">varien/js.js<params>async</params></action>
<action method="addJs">varien/form.js<params>async</params></action>
<action method="addJs">varien/menu.js<params>async</params></action>
<action method="addJs">mage/translate.js<params>async</params></action>
<action method="addJs">mage/cookies.js<params>async</params></action>

GTmetrix GTmetrix

Was this worth your time?

Continue reading

Full archive