skip to Main Content

Why minify javascript code

Why Minify Javascript Code

What is minification in JavaScript?

Minification, also known as minimization, is the process of minimizing code and markup in web pages and script files. This will remove all unnecessary character from Javascript source code without altering its functionality. It includes the removal of whitespace, comments, and semicolons, along with the use of shorter variable name and functions. This method is used to reduce loading times and bandwidth usage on the website. It’s also beneficial to users accessing your website through a limited data plan and who would like to save on their bandwidth usage.

Here is a block of code before and after minification:

Before minification, there are 10 lines of code

After minification, there is a single line of code

To minify Javascript, you can use this tool minify Javascript

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top