minify

How to deploy minified Javascript files to a web server without changing the file's Timestamp?

We have several hundred javascript files in our app that are currently being served uncompressed. One piece of our solution to gain a little more client performance is to minify our javascript files. I've created an automated solution to do this on the build, however, when these new files are deployed, the files' timestamp that determine...

Python script for minifying CSS?

I'm looking for a simple Python script that can minify CSS as part of a web-site deployment process. (Python is the only scripting language supported on the server and full-blown parsers like CSS Utils are overkill for this project). Basically I'd like jsmin.py for CSS. A single script with no dependencies. Any ideas? ...

How to configure mod_rewrite to serve minified files, if available?

Hi, mod_rewrite gurus! Here is the problem: we have lots of Javascripts and lots of CSS files, which we'd rather be serving minified. Minification is easy: set up the YUI Compressor, run an Ant task, and it spits out minified files, which we save beside the originals. So we end up with the following directory structure somewhere inside...

Best packing strategy for js during continuous integration?

I need to pack all my js, but need to edit it going into source control. is there a nice easy plugin for ccnet, or nant, that will allow me to pack my js, and store them in the same files on the way out to production. Not really looking for file combining, just minifying each file. ...

Script Minification and Continuous Integration with MSBuild

On a recent project I have been working on in C#/ASP.NET I have some fairly complicated JavaScript files and some nifty Style Sheets. As these script resources grow in size it is advisable to minify the resources and keep your web pages as light as possible, of course. I know many developers who hand-feed their JavaScript resources into...

Do you have any tips for C# Minification?

I need to minify some C# code in a handful of Silverlight .cs and .xmal files. What are your tips for maintaining one code base and running a "tool" to generate minified code for a project? Are there any tools (like Resharper) that will do this? If not fully, partially or assist in some way... EDIT: I realize that there is no need for ...

Minifying HTML

I've googled around but can't find any HTML minifacation scripts. It occoured to me that maybe there's nothing more to HTML minifacation than removing all unneeded whitespace. Am I missing something or has my Google Fu been lost? ...

Which Javascript minifier (cruncher) does the same things that the one Google uses for its JS APIs?

I am a Google Maps API (javascript) developer. I have noticed that Google uses a Javascript minifier that has the following features: Shortens variables, properties, arguments, classes, function and method names, obfuscating the code. (eg. function1 -> a, function2 -> b, function3 -> c) Some variables, classes, properties and methods c...

Are there any sites/services/scripts that will reverse JS minification?

I'm looking for a way to input a minified JavaScript file and end up with something readable. I understand that it won't have the original variables, they'll all be single letters, but at least it would have lines breaks and possibly tabs. Is there anything out there? ...

Minify an Entire Directory While Keeping Element/Style/Script Relationships?

Do any solutions currnetly exist that can minify an entire project directory? More importantly, do any solutions exist that can shorten classnames, id's, and keep them consistent throughout all documents? Something that can turn this: Index.html --- <div class="fooBar"> <!-- Code --> </div> Styles.css --- .fooBar { // Comments...

Updating javascript references after minifying during build process

What are the best ways of updating javascript references after minifying them (I use YUI Compressor)? I am using ASP.NET mvc and have a bunch or javascript references in each file during dev. At build time (using MSBuild) I minify all the files into single file. At the same time I want to replace all the references with the single refer...

How to generate minified javascript with Script#?

I am testing Script# and its manual tells me that it has a "Release" mode, where the code is minified for performance. But I couldn't find how to enter this mode. Anyone knows? Update BenS has found a command line solution. I wonder if there is a graphical solution, preferably integrated with Visual Studio. ...

Html minification?

Is there any online tool that we can input the html source of a page and it will minify the code? I would do that for aspx files that are not a good idea to make the webserver gzip them... thanks! ...

Any recommendations for a CSS minifier?

Any recommendations for a CSS minifier? I’ll be rooting around Google and trying some out, but I suspected that the smart, proficient and curiously handsome StackOverflow community might have already evaluated the pros and cons of the heavyweights. ...

Gzip versus minify

I had a somewhat lively discussion the other day about minifying Javascript and CSS versus someone who prefers using Gzip. I'll call this person X. X said that Gzip allready minifies the code, since it zips your files. I disagree. Zip is a lossless method of shrinking filesize. Lossless means the original must be restored perfectly, m...

Online Tool to Unminify / Decompress JavaScript

Are there any scripts and/or online tools that can reverse the effects of minification similar to how Tidy can clean up horrific HTML? I'm specifically looking to unminify a minified JavaScript file, so variable renaming (like with compression or packing) should theoretically not be an issue. ...

JavaScript : Good tool to 'minify' jQuery based js files

Hi, We are using jQuery in our project. We have numerous custom javascript files in our web-app that have UDFs utilizing the jQuery features. We need to reduce the size (as a part of performance improvement activities) and I am looking for a reliable 'minifier' for these files (it would be great if the same tool could minify the CSS fil...

Javascript Minifier that preserves conditional comments?

I tried out the online JS Minifier but it cuts out conditional comments like: var u = navigator.userAgent;var e=/*@cc_on!@*/false; BECOMES var u=navigator.userAgent;var e=false; This would affect the operation of the code, so instead of manually adding the stripped out comments manually, I'm looking for ...

Ways to compress/minify javascript files

Duplicate: Best javascript compressor Which javascript minification library produces better results? What is the best method to reduce the size of my Javascript and CSS files? So far I have seen these tools to compress javascript files Packer List item Yahoo Compressor On Packer page there is a section "Packer versu...

Benefit of compressing javascript/css files when using IIS httpCompression.

It looks like IIS httpCompression compresses your files. If this compression is in place, what is the reason to compress files using compression tools like: Packer, JSMin or Yahoo Compressor? ...