JS Minifier js压缩
预先给出了一段测试代码. 点击
JSMin压缩
就会在下面得到压缩后的代码.
Comments
你想要压缩的代码,拷贝到下面的框中
// is.js // (c) 2001 Douglas Crockford // 2001 June 3 // is // The -is- object is used to identify the browser. Every browser edition // identifies itself, but there is no standard way of doing it, and some of // the identification is deceptive. This is because the authors of web // browsers are liars. For example, Microsoft's IE browsers claim to be // Mozilla 4. Netscape 6 claims to be version 5. var is = { ie: navigator.appName == 'Microsoft Internet Explorer', java: navigator.javaEnabled(), ns: navigator.appName == 'Netscape', ua: navigator.userAgent.toLowerCase(), version: parseFloat(navigator.appVersion.substr(21)) || parseFloat(navigator.appVersion), win: navigator.platform == 'Win32' } is.mac = is.ua.indexOf('mac') >= 0; if (is.ua.indexOf('opera') >= 0) { is.ie = is.ns = false; is.opera = true; } if (is.ua.indexOf('gecko') >= 0) { is.ie = is.ns = false; is.gecko = true; }
Level:
最小压缩
普通压缩
超级压缩
Minimal
: original algorithm but keep linefeeds if single -
Conservative
: original algorithm -
Agressive
: remove more linefeed than the original algorithm but can be regressive
压缩后代码
状态提示
原来大小:
压缩后大小:
压缩率: