Home >Web Front-end >JS Tutorial >ANT compresses (removes spaces/comments) JS files to improve js running speed_extjs
1. Explain that when using extjs, the operation is relatively stuck, especially when there is too much running data and js, it will be stuck or the waiting time will be relatively long.
There are many optimization methods to solve this problem. One of them today is to remove spaces and comments in js when packaging Ant scripts, and merge them. I won’t talk about merging today. This has not been implemented yet. Under research
2. First, you need to prepare two .jar files, namely YUIAnt.jar and yuicompressor-2.4.x.jar.
3. Attachments of the two files
Download address
4. The build.xml file is as follows