I look for tool which can compress JavaScript source code. I found some web tools which only deletes whitespace chars? But maybe exist better tool which can compress user's function names, field name, deletes unused fields, others.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
Javascript minimizer have been discussed here before, but still I feel that the JavaScript compressor rater web page summarizes them best:
A tool often used to compress JS code is the YUI Compressor.
Considering there is this option :
It should be able to do what you asked.
And here is an article about it : Introducing the YUI Compressor.
Quoting that article :
As a sidenote : don't forget to gzip your JS/CSS files, when serving them from your webserver : this will reduce the size of data that goes through the network quite a lot !
For instance, if you are using Apache, take a look at
mod_deflate
.Check out YUI Compressor, there is also ESC, but I suspect YUI is a bit better. Up to you to test.