Magento 2 Defer Javascript | Userguide

Magento 2 Defer Javascript | Userguide, updated 7/4/24, 8:06 AM

categoryOther
visibility6
  verified

Boost your store's performance with the MageAnts Magento 2 Defer JavaScript Extension. This powerful tool allows you to improve page load times by deferring the parsing of JavaScript, ensuring a smoother and faster browsing experience for your customers.

Key Features:

Enhanced Performance: Significantly speed up your website by implementing Magento 2 defer JavaScript.

Improved SEO: Better page load times can lead to higher search engine rankings.

User-Friendly Configuration: Easily set up and manage Magento 2 defer parsing of JavaScript through a simple interface.

Increased Conversions: Faster load times contribute to lower bounce rates and higher customer satisfaction.

Comprehensive Support: Compatible with various Magento 2 themes and extensions.

View frontend demo
View backend demo

Optimize your Magento 2 store's performance with the MageAnts Defer JavaScript Extension. Enhance user experience, boost your SEO, and ensure your site runs smoothly by deferring the parsing of JavaScript today.

About MageAntsStore

MageAnts is your trusted partner of Magento Custom DevelopmentHyvä theme development solutions provider. Put your trust in us to create an online presence for you. Let us bring you into the digital age to embark on an incredible journey. Enhance your Magento store with our Magento 2 extensions & extend store functionality.

Tag Cloud

DeferJs

– Magento 2


USER MANUAL
Supported Version: 2.0, 2.1, 2.2, 2.3, 2.4
www.mageants.com support@mageants.com 1
Table Of Contents
Preface ......................................………………………......3
Installation......................………………………………………..4
Option 1: Magento 2 install extension using COMMAND LINE ..…...…..4
Option 2: Magento 2 install extension manually ……………….…….......5

Extension configuration…………………………………………...6
Frontend Example………………………………………….8
www.mageants.com support@mageants.com 2
Preface :
Magento 2 Defer JavaScript Extension is one of the most
powerful factors that help to improve the web sites speed.
This module is useful for reducing the loading time of a
website so customers can enjoy a well shopping experience
on your store.
www.mageants.com support@mageants.com 3
Installation :
There are two ways of installing extension in magento2.
1) Using COMMAND LINE.
2) Manually Install extension.
Option 1: Magento 2 install extension using COMMAND
LINE (Recommended) Follow below steps to install extension
from the command line.
Step 1: Download the extension and unzip it.
Step 2: Upload it to code directory in your magento
installation’s app directory If code directory does not exists
then create.
Step 3: Disable the cache under System -> Cache
Management.
Step 4: Enter the following at the command line:php
bin/magento setup:upgrade
Step 5: Once you complete above steps log out and log in
back to the admin panel and switch to Stores ->
Configuration -> Defer Js, the module will be displayed in
the admin panel.
www.mageants.com support@mageants.com 4
Option 2: Magento 2 install extension manually
Step 1: Download the extension and unzip it.
Step 2: Upload it to code directory in your magento
installation’s app directory If code directory does not exists
then create.
Step 3: Disable the cache under System -> Cache
Management Edit app/etc/config.php file and add one line
code:‘Mageants_Deferjs’ => 1
Step 4: Disable the cache under System -> Cache
Management
Step 5: Once you complete above steps log out and log in
back to the admin panel and switch to Stores ->
Configuration -> Defer Js, the module will be displayed in
the admin panel.
www.mageants.com support@mageants.com 5
Configuration:
After Installation of Extension go into Magento admin panel
for set configuration of the extension.
After Installation of Extension Go to Store → Configuration →
Mageants → Defer Js Configuration And Enable Module Set
“Yes” option.
Defer IFrames :
If you Selecting Yes, then embedded code using IFrame
tag of your web site is loading only when your site finishes
loading completely. This thing will cause defer score of your
website decrease or the site does perform fast enough for
better customer experience.
Exclude Controller :
Write down your wished controllers and click Add Match
button that you want to disable Defer Js for Magento 2.
www.mageants.com support@mageants.com 6
Exclude Paths :
Write down your wished paths or controllers and click
Add Match button that you want to disable Defer Js for
Magento 2.
Show Controllers And Paths :
Show Current page Controller and path in end of the
page.
Exclude Home Page :
After selecting yes, the Home page will be unaffected by
deferring JavaScript.
Put JavaScript In HTML Body Tag :
After selecting yes, JavaScript call in HTML body tag.
www.mageants.com support@mageants.com 7
Frontend example
After Show Controllers And Paths selecting Yes, you can find
information about the Current Controllers / Paths in the table at the
end of the frontend page:
www.mageants.com support@mageants.com 8
Thank you!
if you have any questions or feature suggestions, please
contact us at: https://www.mageants.com/contact-us
Your feedback is absolutely welcome!
www.mageants.com support@mageants.com 9