Defer JavaScript means that JavaScript files loading will be delayed until parsing the page content finishes. Therefore, a browser loads all content before JavaScript files, which makes Magento sites perform faster than loading everything at the same time.

Beside deferring JavaScript manually by changing codes, admin can install an extension also called Defer JavaScript for Magento 2 to improve site speed and enhance customer experience effectively.

  • Automatically defer parsing of JavaScript by delaying JavaScript loading till the last moment after all HTML and CSS files
  • Improve page speed score when testing with GTMetrix


+ After installing Defer JavaScript:

Name:  Magento_2_defer_JavaScript_-_after_installing.PNG
Views: 3
Size:  13.3 KB

+ Before installing Defer JavaScript:

Name:  Magento_2_defer_jajascript_-_before_installing.PNG
Views: 3
Size:  14.2 KB

Check it out for FREE Installation - FREE 1-year Support and FREE Updates!

View more threads in the same category: