Online JS / CSS / HTML minifier
Is there a service out there that provides public API for compressing 开发者_Python百科CSS or Javascript?
(Like imgur let's you upload images trough PHP and get the image URL)
Google Closure Compiler let's you send JavaScript code with POST request and returns optimalized code.
The Closure Compiler can be used for JavaScript. It has an API (link on the top right hand corner). It does a decent job on compiling JavaScript.
The YUI compressor by Yahoo is your best bet. You can download it (http://developer.yahoo.com/yui/compressor/), or use an online solution: http://www.refresh-sf.com/yui/
It does CSS and JavaScript.
Pretty Diff can minify CSS, JavaScript, and HTML.
http://prettydiff.com/?m=minify&html
Free developer tools can minify and beautify CSS and JavaScript.
http://freedevelopertools.com
I prefer using the tool on www.blimptontech.com for minifying my Javascript files. They also have a feature to combine your files into one and minify at the same time. I like it because it uses UglifyJS to get the dirty work done.
Another online tool you can use to minify/compressing your js is http://samqode.com/minifyjs . very soon There will be a public API available for on the fly (via url request) minification so its a good one to watch out for.
You can use jsCompressor and CSSCompressor for minifing your javascript and css code.
I am using .Maui and it is awesome! You can minify and combine CSS and JS using the web tool or the free API. For JS it even optimize the code and is ES5 and ES6 compatible! There are other useful tools like Sitemap Generator, HTML Minify, Image Resizer and Free CDN for the minified files.
Before i tried Google Closure Compiler, cssminifier.com and javascript-minifier.com, but they have restrict limits of POST size and number of requests per second.
精彩评论