User Tools

Site Tools


java-script:minification-uglification

This is an old revision of the document!


Minification and Uglification in Java Script

Minification and uglification are techniques to make your JavaScript files smaller, and sometimes obfuscate the code, so it's harder to read. This can lead to faster load times and a little extra security through obscurity.

Minification

Minification is the practice of removing all unnecessary characters from code without changing its functionality.
This includes removing all unnecessary whitespace, newlines, comments, etc.

Terser is a popular tool for minifying modern JavaScript files. Here's an example of how you could use it:

java-script/minification-uglification.1691598671.txt.gz · Last modified: 2023/08/09 19:31 by odefta