Home >Web Front-end >JS Tutorial >How to compress javascript with Microsoft Ajax Minifier_javascript tips
But the commonly used command is ajaxmin -a -h inputfile.js -o outputfile.js (this is a high compression method)
You can also analyze JS code. The command is ajaxmin inputfile.js -a -w:3
For more usage methods, please refer to the Help instructions.
ajaxmin.exe Download Microsoft AJAX library (sixth preview version)
When Ajaxmin compresses multiple files:
Ajaxmin —inputfile_1 —inputfile_2 —o —oututfile /Eo:utf- 8 /Ei:utf-8
where
/Eo:utf-8 /Ei:utf-8 represents the input and output format. If not specified, the default ASCII code is used.
While asking for advice, my brother wrote a program to execute the Ajaxmin program:
The code is as follows: