Overview
Back to topMinification is the process of removing all unnecessary characters from source code without changing its functionality - e.g. code comments and formatting, removing unused code, using shorter variable and function names, and so on. After minification code is smaller in size which means fewer bytes will be transmitted from your server to your customer's web browsers which makes your site pages load faster. Besides a small speed increase search engines (especially Google) will give you a plus in the SEO department (Search Engine Optimization). So you should Minify your code.
Apptrian Minify HTML CSS JS is a very small and efficient extension. It will minify HTML code including inline CSS and JavaScript code. Merging and Minification of CSS and JavaScript files is already a built-in feature of Magento 2 and newer, therefore, our extension does not influence this functionality in any way. The extension is very easy to install and use. Compatible with FPC and Varnish cache extensions. If there is a serious error in some page code that page will not be minified. The extension will log the error and URL of the page where this error occurs so developers can track it down and fix the code.
Compatible with Breeze frontend without the need for an additional compatibility module. It works out of the box.
Compatible with Hyvä frontend without the need for an additional compatibility module. It works out of the box.
Features
- An easy way to enable or disable HTML Minification.
- Option to set Maximum HTML Minification.
- Cache Compatibility Mode option for HTML minification.
- Option to remove important comments or not.
- Merging and Minification of CSS and JavaScript files is already a built-in feature of Magento 2 and newer, therefore, our extension does not influence this functionality in any way.
Support
This extension is FREE, however, support is NOT. Please understand that we get more than a few emails almost every day asking for support. In most cases, problems are a lack of basic Magento knowledge and not reading Installation Instructions. Due to our other projects, we do not have time to answer all of them. Because of this, we cannot provide free support for our free extensions. However, we offer very affordable support options for this extension on our site.
FAQs
Q: Why after enabling minification my pages are all mangled up / have missing parts?
A: You probably have errors in your HTML/CSS/JS code. One stray tag is enough to cause this behavior. Before you enable minification you must have an error-free code. Turn minification off, use the W3C validator to find errors and fix them.
Q: Why are not all CSS/JS files merged and minified?
A: First of all external(off-site) CSS/JS files will not be merged and minified. For example:
Minifying https://platform.linkedin.com/…ork?v=0.0.2000-RC8.41700-1420&lang=en_US could save 2KiB (5% reduction) after compression.
This happens if you use a Linkedin button, this file is on the Linkedin server not on your server it is their responsibility to minify it, not yours, your Magento installation nor our Minify extension.
Second, all CSS/JS must be properly included in Magento via .xml file (for example page.xml of your theme). Some extensions might hardcode link and script tags into .phtml templates, these files will not be merged by the Magento default file merger (Magento does not know about them because they are not properly included) and subsequently, will not minify them. Third, Merging and Minification of CSS and JavaScript files is already a built-in feature of Magento 2 and newer, therefore, our extension does not influence this functionality in any way.
Q: Why do Google PageSpeed Insights report that CSS/JS files are not fully minified? (1)
A: Sometimes it is because gzip compression is turned off on your server. Use your .htaccess file to enable it.
Q: Why do Google PageSpeed Insights report that CSS/JS files are not fully minified? (2)
A: Sometimes Google PageSpeed Insights will report that CSS/JS files are not fully minified. For example:
Minifying https://www.apptrian.com/…a/js/6a3cfa142fd20a7dc62423f1c15e4ad9.js could save 648B (1% reduction) after compression.
This is normal. Some of the CSS/JS files/libraries published by Google also have above or similar complaints from Google PageSpeed Insights.
Minifying https://apis.google.com/…/cb=gapi.loaded_0 could save 684B (2% reduction) after compression.
If Google itself cannot satisfy its own Google PageSpeed Insights testing tool, then what chance anyone else has. :-D
Rest assured your files are properly minified, by the tools recommended by Google, so just ignore these types of complaints from Google PageSpeed Insights.
A Word From The Author
Thank you very much for your interest in Minify HTML CSS JS extension. You can rest assured that by choosing this extension you are getting a high-quality product despite the fact it is free. The same professional approach, dedication, and care are invested in this product as if it is paid one. If you find this product useful and want to say "thanks" you can do that by rating it and writing a short review about it on Magento Marketplace. Also, you can like, share, and follow us on Facebook, Pinterest, and Twitter. If you have any questions about extension or Magento in general feel free to contact us.
Technical Specifications
Back to topSeller profile
Seller contact
Current Version
2.1.1
Adobe Commerce platform compatibility
Adobe Commerce (cloud): 2.4 (current), 2.2 (obsolete), 2.3 (obsolete)
Adobe Commerce (on-prem): 2.4 (current), 2.2 (obsolete), 2.3 (obsolete)
Magento Open Source: 2.4 (current), 2.0 (obsolete), 2.1 (obsolete), 2.2 (obsolete), 2.3 (obsolete)
Type
Stable Build
Updated
28 February, 2025
Categories
Extensions, Site Optimization, Performance
Documentation
License Type
Open Software License 3.0 (OSL-3.0)
Policy
Quality Report
Back to topAll tests were conducted on the latest versions of Adobe Commerce that existed for the compatible release lines at the moment of the extension submission. Latest versions of all other software were used, as applicable.
Release Notes
Back to top2.1.1:
- Compatible with Adobe Commerce (cloud) : 2.2 2.3 2.4
- Compatible with Adobe Commerce (on-prem) : 2.2 2.3 2.4
- Compatible with Magento Open Source : 2.0 2.1 2.2 2.3 2.4
- Stability: Stable Build
-
Description:
* Config page explanation improved
2.1.0:
- Compatible with Adobe Commerce (cloud) : 2.2 2.3 2.4
- Compatible with Adobe Commerce (on-prem) : 2.2 2.3 2.4
- Compatible with Magento Open Source : 2.0 2.1 2.2 2.3 2.4
- Stability: Stable Build
-
Description:
+ Compatibility with Breeze frontend
+ Compatibility with Hyvä frontend
* Fixed bug with single-line and multi-line comments inside HTML comments
2.0.9:
- Compatible with Adobe Commerce (cloud) : 2.2 2.3 2.4
- Compatible with Adobe Commerce (on-prem) : 2.2 2.3 2.4
- Compatible with Magento Open Source : 2.0 2.1 2.2 2.3 2.4
- Stability: Stable Build
-
Description:
* Fixed issue with Knockout JS (KO) comment tags and some 3rd party extensions
2.0.8:
- Compatible with Adobe Commerce (cloud) : 2.2 2.3 2.4
- Compatible with Adobe Commerce (on-prem) : 2.2 2.3 2.4
- Compatible with Magento Open Source : 2.0 2.1 2.2 2.3 2.4
- Stability: Stable Build
-
Description:
* Fixed compatibility with PHP 8.2
2.0.7:
- Compatible with Adobe Commerce (cloud) : 2.2 2.3 2.4
- Compatible with Adobe Commerce (on-prem) : 2.2 2.3 2.4
- Compatible with Magento Open Source : 2.0 2.1 2.2 2.3 2.4
- Stability: Stable Build
-
Description:
* Fixed compatibility with PHP 8.1
2.0.6:
- Compatible with Adobe Commerce (cloud) : 2.2 2.3 2.4
- Compatible with Adobe Commerce (on-prem) : 2.2 2.3 2.4
- Compatible with Magento Open Source : 2.0 2.1 2.2 2.3 2.4
- Stability: Stable Build
-
Description:
* Small Magento EQP improvements
2.0.5:
- Compatible with Adobe Commerce (cloud) : 2.2 2.3 2.4
- Compatible with Adobe Commerce (on-prem) : 2.2 2.3 2.4
- Compatible with Magento Open Source : 2.0 2.1 2.2 2.3 2.4
- Stability: Stable Build
-
Description:
* Compatibility with PHP v7.4
* Compatibility with CSP (Content Security Policies)
2.0.4:
- Compatible with Magento Open Source : 2.0 2.1 2.2 2.3
- Stability: Stable Build
-
Description:
* Compatibility with PHP v7.3
2.0.3:
- Compatible with Magento Open Source : 2.0 2.1 2.2 2.3
- Stability: Stable Build
-
Description:
* Compatibility with PHP v7.2
* Fixed options text in Magento admin config
2.0.2:
- Compatible with Magento Open Source : 2.0 2.1 2.2
- Stability: Stable Build
-
Description:
* Compatibility with Magento 2.2
2.0.1:
- Compatible with Magento Open Source : 2.0 2.1
- Stability: Stable Build
-
Description:
* Complete rewrite from the ground up
+ Support for Knockout JavaScript library comments
+ Support for script tags of type="text/x-magento-template"
+ Logging of errors with url where errors occur
+ Compliance with Magento's Extension Quality Program (EQP)
* Small bug fixed
Support
Back to topThe best place to start if you need help with a specific extension is to contact the developer. All Adobe Commerce developers have both a contact email and a support email listed.
Contact Vendor