5

Is there a service out there that provides public API for compressing CSS or Javascript?

(Like imgur let's you upload images trough PHP and get the image URL)

asked Aug 19, 2011 at 9:53
6
  • Why would you want this? Commented Aug 19, 2011 at 9:56
  • because the generated css / js is dynamic, and I was thinking I could use a service like this to generate a minifed cache of the css/js Commented Aug 19, 2011 at 9:58
  • SO is actually about coding help and support, not about searching for services, there are plenty of sites that can help you with that. Commented Aug 19, 2011 at 9:58
  • How often does it change? Every page load? When you upload changed files? Commented Aug 19, 2011 at 10:07
  • when the site administrator changes the site configuration (like changing color scheme, adding new content blocks etc) Commented Aug 19, 2011 at 10:12

9 Answers 9

4

Google Closure Compiler let's you send JavaScript code with POST request and returns optimalized code.

answered Aug 19, 2011 at 9:57

Comments

2

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.

answered Aug 19, 2011 at 9:55

Comments

1

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.

answered Aug 19, 2011 at 9:55

Comments

1

Pretty Diff can minify CSS, JavaScript, and HTML.

http://prettydiff.com/?m=minify&html

answered Dec 11, 2011 at 4:28

Comments

1

Free developer tools can minify and beautify CSS and JavaScript.

http://freedevelopertools.com

answered Jun 10, 2013 at 13:05

Comments

1

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.

answered Jul 7, 2013 at 20:27

Comments

1

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.

answered Oct 24, 2013 at 20:06

1 Comment

this one is based on Google Closure Compiler as well
0

You can use jsCompressor and CSSCompressor for minifing your javascript and css code.

answered Oct 1, 2014 at 8:54

Comments

0

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.

answered Jun 4, 2017 at 16:58

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.