WebAppers

/ best free open source web resources /

Shopify

Minify – Combine & Compress CSS or Javascript Files

Posted · Category: BSD License, Code

Minify is a PHP5 app that can combine multiple CSS or Javascript files, compress their contents (i.e. removal of unnecessary whitespace/comments), and serve the results with HTTP encoding (gzip/deflate) and headers that allow optimal client-side caching.

Yahoo’s Combo Handler and Google’s AJAX Libraries API both serve content from their heavy-duty CDNs and potentially increase the chance that your visitor will already have a file in her browser cache. Neither service serves custom content that you provide. You may wish to use these services to serve popular libraries and Minify to serve your code.

Minify is distributed under the New BSD License, which means that you’re free to use, modify, and redistribute Minify or derivative works thereof, even for commercial purposes, as long as you comply with a few simple requirements. See the License file for details.

combine multiple CSS or Javascript files

Requirements: -
Demo: http://code.google.com/p/minify/
License: New BSD License

19 Comments
  • Dreur

    And what about Yui Compressor ?

    http://developer.yahoo.com/yui/compressor/

  • Pingback: 網站製作學習誌 » [Web] 連結分享

  • Pingback: Minify, réduisez et réunissez vos fichiers CSS et Javascript | LoïcG

  • Jonny

    I have been using Minify for a while now…and it is great! I definitely recommend it. Use the groups feature to combine all your JavaScript files into one download.

  • Pingback: Minify: Combina y comprime archivos JavaScript o CSS | Clearfix

  • Pingback: Entradas en las blogosferas.100, Carrero

  • http://www.panares.org Angelo Panares

    We’ve tried CSSTidy here in the office and we love it. We have been looking for something similar for PHP and we’ll give minify a try. thank for this.

  • http://www.majic3.com Sam

    @Angelo – there is a cssTidy php class
    csstidy.sourceforge.net/usage.php

    Its nice to be able to use minify to crush n’ combine both (into sets a single script and sheet)

    @Dreur – YUI can’t be used on-the-fly

    I think the next step is to allow minify to retain License comments. EG swfobject, dojo, jquery etc so that License stipulations are adhered to and http requests reduced to minimum.

  • http://www.majic3.com Sam

    FAYI

    Minify retains /*! comments such as this */. It works like a charm.

    Also it applies prefixes to CSS URLs too – I am yet to see this in action, a great idea. And plans are underway to intergrate into apache and bypass php altogether.

  • http://blog.complimedia.com Montana Flynn

    I am so happy I found webappers! Minify will be a great addition to my development process.

  • http://code.google.com/p/web-optimizator/ sunnybear

    There is another web tool to minify, merge, and compress your CSS/JS code – Web Optimizer ( http://code.google.com/p/web-optimizator/ ). It’s also free and more powerful than Minify.

  • http://jscrambler.com riba

    I would like to suggest another tool to minify / compress javascript: http://jscrambler.com

    It is a online tool so no installation is required. When considering only javascript it achieves much better compression than minify. It has an additional set of features not related with compression ex: obfuscation and domain lock…

    That said, it still doesn’t process CSS its only processes javascript.

  • Dorith

    If you use ASP.NET, have a look at this:
    http://www.codeproject.com/KB/aspnet/CombineAndMinify.aspx

  • http://www.backslash.ch Mischa Sameli

    And just another new kid on town for merging and compressing css and javascript files: http://shrinker.ch

  • Tamik

    here is an online tool that does gzip compression of css and javascript files : http://www.zbugs.com

  • http://ww.swebdizajn.com web dizajn

    An exceptional tool. However, both the old and the new version I noticed that not very well kobinuje jquery-1.4.2 and jquery.coda-slider-2.0 I do not know why. Also, do not support the complete combination jquery.lavalamp. Has anyone had a similar experience?

  • http://veteriner.co/ Veteriner

    I try to immediately, thanks

  • kellyStephens

    I prefer the tool at http://www.BlimptonTech.com . They use UglifyJS and you can can combine files. Their tool has never let me down. Simple, works correctly every time and free is always the best in my opinion

  • Howard

    I personally prefer the online tool at http://www.blimptontech.com it uses UglifyJS2 as its library for minification which also gives you concatenation of the variables. It is the most solid library I have found for production minified JS code. It has never let me know down when I have needed to minfy javascript.

    It is a free online tool that seems to get regularly updated, which many online tools seem to not be. They seem to be stuck on a release when they were put online and then never touched again. I read on a forum that the tool is also suppose to be getting an update soon that will allow CSS to be minified and a few other cool tools. Give it a try.

Supported By

Deals

Web Browsers Icon Set
Food Icon Set
Flat Icon Set

Flat Icon Set

100 icons