PHPackages                             hryvinskyi/magento2-deferjs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hryvinskyi/magento2-deferjs

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

hryvinskyi/magento2-deferjs
===========================

N/A

1.3.3(1y ago)1430.1k↓50%3[1 PRs](https://github.com/hryvinskyi/magento2-deferjs/pulls)MITPHPPHP ~7.4.0||~8.0||~8.1||~8.2||~8.3||~8.4CI failing

Since Mar 22Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/hryvinskyi/magento2-deferjs)[ Packagist](https://packagist.org/packages/hryvinskyi/magento2-deferjs)[ RSS](/packages/hryvinskyi-magento2-deferjs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (17)Used By (0)

Magento 2 Defer JavaScripts
===========================

[](#magento-2-defer-javascripts)

The module moves javascripts to the bottom of the page.

[![Latest Stable Version](https://camo.githubusercontent.com/047db8f0a9d779bd3e71aedbccec7e336cdafcaf0aaaf85b57e0d863474f01ef/68747470733a2f2f706f7365722e707567782e6f72672f68727976696e736b79692f6d6167656e746f322d64656665726a732f762f737461626c65)](https://packagist.org/packages/hryvinskyi/magento2-deferjs)[![Total Downloads](https://camo.githubusercontent.com/76a78c4725d6dea6d702ec13e32fd59f72bffbd19e9e6384941c1779bd14b62a/68747470733a2f2f706f7365722e707567782e6f72672f68727976696e736b79692f6d6167656e746f322d64656665726a732f646f776e6c6f616473)](https://packagist.org/packages/hryvinskyi/magento2-deferjs)[![PayPal donate button](https://camo.githubusercontent.com/0d6e4d8b50b5983a58205941b1a581b1305903393b7a39da574e3f60af3c7f5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70617970616c2d646f6e6174652d79656c6c6f772e737667)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=volodymyr%40hryvinskyi%2ecom&lc=UA&item_name=Magento%202%20Defer%20Javascript&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted "Donate once-off to this project using Paypal")[![Latest Unstable Version](https://camo.githubusercontent.com/a311b4ddc53c450edda87f6ff9105002b087a5219204d41d1b09b86d1a46e36e/68747470733a2f2f706f7365722e707567782e6f72672f68727976696e736b79692f6d6167656e746f322d64656665726a732f762f756e737461626c65)](https://packagist.org/packages/oakcms/oakcms)[![License](https://camo.githubusercontent.com/e8c104540d85e7a22fc6142e15a4080f5a83c69ea1bc99a3d87405480f1ba9f3/68747470733a2f2f706f7365722e707567782e6f72672f68727976696e736b79692f6d6167656e746f322d64656665726a732f6c6963656e7365)](https://packagist.org/packages/hryvinskyi/magento2-deferjs)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b9d67b2c2b77182c92de770a339c08448b105538508d1f702939465a17ae80fb/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f68727976696e736b79692f6d6167656e746f322d64656665726a732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/hryvinskyi/magento2-deferjs/?branch=master)[![Build Status](https://camo.githubusercontent.com/37f3473e4e648e1c991d147b69d03e5699dc5206e1b713681becdcebe1ba4048/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f68727976696e736b79692f6d6167656e746f322d64656665726a732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/hryvinskyi/magento2-deferjs/build-status/master)

Installation Guide
==================

[](#installation-guide)

### Install by composer

[](#install-by-composer)

```
composer require hryvinskyi/magento2-deferjs
bin/magento module:enable Hryvinskyi_Base
bin/magento module:enable Hryvinskyi_DeferJs
bin/magento setup:upgrade

```

### Install download package

[](#install-download-package)

1. Download module  "Clone or download -&gt; Download Zip"
2. Download this module "Clone or download -&gt; Download Zip"
3. Unzip two modules in the folder app\\code\\Hryvinskyi\\Base and app\\code\\Hryvinskyi\\DeferJs
4. Run commands:

```
bin/magento module:enable Hryvinskyi_Base
bin/magento module:enable Hryvinskyi_DeferJs
bin/magento setup:upgrade

```

5. Configure module in admin panel

General Settings
================

[](#general-settings)

To get the access to the 'Defer JavaScripts' settings please go to Stores -&gt; Configuration -&gt; Hryvinskyi Extensions -&gt; Defer JavaScripts and expand the General Settings section.

***Enabled deferred javascript:*** Enable or disable the extension from here.
***Disable move attribute:*** Enter the attribute that will block the move of the script to the bottom.
***Enabled minify body scripts:*** Enable script minification.

Features
========

[](#features)

- Ability to skip javascripts with a special tag that can be set in the admin panel
- Built-in skipping move Google tag manager (If you use a third-party module and can not add a special tag)
- Exclude by controllers from defer parsing of JavaScript.

    *Controller will be unaffected by defer js. Use like: \[module\]*\[controller\]*\[action\] (Example: cms\_index\_index)*
- Exclude by store paths from defer parsing of JavaScript.

    *Paths will be unaffected by defer js. Use like: /women/tops-women/jackets-women.html*
- Exclude by url pattern from defer parsing of JavaScript.

    *URL pattern can be a full action name or a request path. Wildcards are allowed. Like:*

    ```
    *cell-phones*
    *cell-phones/nokia-2610-phone.html
    customer_account_*
    /customer/account/*
    *?mode=list

    ```
- Minification of moved javascripts
- Optimize text/x-magento-init scripts
- Ability to extend the module with your validator
- Increased rendering time improves the Google Page Speed score.

Add custom validator
====================

[](#add-custom-validator)

To add your validator:

1. Create Validator file `app/code/Vendor/Module/Model/PassesValidator/Validators/YourValidator.php`:

    ```

                    Vendor\Module\Model\PassesValidator\Validators\YourValidator

    ```
3. Run command:

    ```
    php bin/magento setup:di:compile

    ```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance59

Moderate activity, may be stable

Popularity34

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~145 days

Recently: every ~297 days

Total

16

Last Release

425d ago

PHP version history (4 changes)1.0.0PHP ~7.1.3||~7.2.0

1.1.3PHP ~7.1.3||~7.2.0||~7.3.0||~7.4.0

1.2.2PHP ~7.1.3||~7.2.0||~7.3.0||~7.4.0||~8.0

1.3.0PHP ~7.4.0||~8.0||~8.1||~8.2||~8.3||~8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/e254b6c28f67e639b2beb3f21a80f2b4ff9efc5ee782943d497b73523f630c1d?d=identicon)[hryvinskyi](/maintainers/hryvinskyi)

---

Top Contributors

[![hryvinskyi](https://avatars.githubusercontent.com/u/9294098?v=4)](https://github.com/hryvinskyi "hryvinskyi (42 commits)")

---

Tags

magentomagento-2magento2-extension

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hryvinskyi-magento2-deferjs/health.svg)

```
[![Health](https://phpackages.com/badges/hryvinskyi-magento2-deferjs/health.svg)](https://phpackages.com/packages/hryvinskyi-magento2-deferjs)
```

###  Alternatives

[baldwin/magento2-module-url-data-integrity-checker

Magento 2 module which can find potential url related problems in your catalog data

281773.3k](/packages/baldwin-magento2-module-url-data-integrity-checker)[yireo/magento2-webp2

Magento 2 module to add WebP support to the Magento frontend

2091.2M7](/packages/yireo-magento2-webp2)[smile/module-store-delivery

Smile Store Delivery

23348.7k1](/packages/smile-module-store-delivery)[mage-os/module-theme-optimization

Page transitions and speculative loading rules for Magento

418.0k](/packages/mage-os-module-theme-optimization)[graycore/magento2-graphql-introspection-cache

1015.2k](/packages/graycore-magento2-graphql-introspection-cache)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
