Magento 2 Defer Parsing of JavaScript Extension

This extension already integrated in Athlete2 Strong Magento 2 Theme

Olegnax Defer Parsing of JavaScript is simple extension that can help you to reduce the time before your customer can see and interact with your content which as result improves customer shopping experience and search rankings.

  • Defer parsing of JavaScript helps improve initial page load time
  • Improve customer shopping experience
  • Improve SERP ranking (your website’s SEO)
  • Defer parsing of JavaScript by moving it to the bottom of the page. So your page content loaded and shown before parsing of JavaScript.
  • Exclude Magento store Paths and Actions from defer parsing of JavaScript.

See it in action on our Magento 2 theme Athlete2 Preview and GTmetrix results.

  • CE 2.3.x, 2.4.x
  • xNo Support
  • xNo Installation Service
  • vUpdates & Bugfixes

Free!

Defer Parsing of JavaScript Magento 2

Why do I need to defer parsing of Javascript in Magento 2?

The browser loads codes from the top to the bottom of the page and it has to load & parse the JavaScript along with content, which can drastically reduce the page load time. It is can be especially useful if you use some extensions with massive JavaScript like Mega Menu. Defer parsing of Javascript moves all script tags to the bottom of the page and as result helps to delay parsing of Javascript until the last moment when HTML and CSS if fully loaded. As a result, visitors don’t have to wait a long time for content to appear and can see and interact with content before javascript is executed, which improves customer shopping experience.

See it in action on our Magento 2 theme Athlete2 Preview and GTmetrix results.

What is this for?

  • Defer parsing of JavaScript helps improve initial page load time
  • Improve user experience
  • Fulfill Google PageSpeed tool recommendation to “Eliminate render-blocking JavaScript above-the-fold content”
  • Improve SERP ranking (your website’s SEO)
    To defer parsing of JavaScript, is a recommendation given by site speed test tools and google announced that they will use page speed as a ranking in their search results. So website performance is crucial in improving your search engine visibility.

What is does / Features

  • Defer parsing of javascript by moving it to the bottom of the page. So your page content loaded and shown before parsing of JavaScript.
    In order to load a page, the browser must parse the contents of all <script> tags, which adds additional time to the page load. By minimizing the amount of JavaScript needed to render the page, and deferring parsing of unneeded JavaScript until it needs to be executed, you can reduce the initial load time of your page.
  • Enable/disable merging of Magento init and other inline scripts. This reduce amount of requests and can provide significant increase in speed.
  • Exclude Magento store paths from defer parsing of JavaScript.
  • Exclude Magento actions from defer parsing of JavaScript.

Defer Parsing of JavaScript options

In addition to basic functionality of defer parsing of javascript, you can enable merging of Magento init and other inline scripts. This will reduce amount of requests and can provide significant increase in speed.

Defer Parsing of JavaScript Magento 2
Defer Parsing of JavaScript Magento 2

Exclude Path and Actions

In case you have an issues with particular scripts for, example on checkout page, then you can exclude this page or path from defer using Exclude Actions and Exclude Path options. And Show Page Action and Path option is here to help you determine path or action for each page.