minification

Which javascript minification library produces better results?

Between Yahoo! UI Compressor, Dean Edwards Packer and jsmin, which produces better results, both in terms of resulting footprint and fewer errors when obfuscating. ...

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. ...

How do you automate Javascript minification for your Java web applications?

Hello SO, I'm interested in hearing how you prefer to automate Javascript minification for your Java web apps. Here are a few aspects I'm particularly interested in: How does it integrate? Is it part of your build tool, a servlet filter, a standalone program post-processing the WAR file, or something else? Is it easy to enable and dis...

C# Code Minification Tools and Techniques

I realize this is a rather odd request, but I was wondering if anyone was aware of some minification/obfuscation tools that work on C# source code (not a compiled assembly). I am trying to reduce the character count of an already written application to meet a character limit and I can't seem to find any tools that will help me achieve th...

texture minification filter in raytracing?

can someone point me to a paper/algorithm/resource/whatever that tells me how to implement a texture minification filter (applies when texels are smaller than pixels) in a raytracer? thanks! ...

Supplying non-minified CSS/javascript on demand

Minfying your stylesheets and script files improves your site's performance. However, sometimes you might want to make the non-minified versions of the files available - perhaps to comply with the GPL or to implement the optional code-on-demand REST constraint. Is there a standardised way of doing this? The only way I can think of is t...

Inclusion Handling in MVC 2 / MVCContrib

I'd like to improve my page by combining and minifying javascript and CSS files. Since MVCContrib already contains a project called IncludeHandling, I took a look at that which unfortunately left me with unanswered questions: There is quite a set of interfaces and objects involved in the process. Now I'm using Ninject.Mvc, but it seems ...

Optimizing website - minification, sprites, etc...

I'm looking at the product Aptimize Website Accelerator, which is an ISAPI filter that will concatenate files, minify css/javascript, and more. Does anyone have experience with this product, or any other "all-in-one" solutions? I'm interesting in knowing whether something like this would be good long-term, or would manually setting up ...

Server-side auto-minify?

Is there any way to automatically minify static content and then serve it from a cache automatically? Similar to have mod_compress/mod_deflate work? Preferably something I could use in combination with compression (since compression has a more noticeable benefit). My preference is something that works with lighttpd but I haven't been ab...

VSDoc alternative?

VSDoc is an awesome way of commenting Javascript, and I particularly like the ability to make one Javascript file 'depend' on another. This paves the way for Javascript minifiers/combiners that take into account proper ordering of script includes. The only thing that might bother some is that it's VS-Doc. Are there any competing format...

Why does Google's Closure Compiler leave a few unnecessary spaces or line breaks?

I've noticed that every time I use Google's Closure Compiler Service, it leaves a few unnecessary spaces in the compiled code presented on the right-hand side of the page. These correspond to line breaks in the hosted version of the compiled code. For example (note the line breaks, each of which seems unnecessary): http://troy.onespot....

how to detect response content-type in asp.net mvc

hi, I've wrote very simple minification/compression handler that minify css and js by indicating request type (Request.RawUrl.EndsWith("css" || "js")), but i don't know an approach to indicate which response type is html and then minify that as HTML-content because in mvc isn't extension to checking. thanks in advance ;) ...

how to both Compress and Minify content together?

hi, i know we can compress response by declaring Response.Filter as GZip or Delfalte streams, but how i can perform both compression and minification together? declaring new class that inherits Stream, then first performing minify on content, then compress that by GZip or Deflate depending on User-Agent supported each? ...

Speed performance: Reduce HTTP requests or not?

Hi everybody, A theoretical question: We all know about the pro's of minifying and combining javascript files in order to reduce HTTP requests to speed up a website. But when popular javascript libraries is used (jQuery for instance), it isn't too stupid to assume that these already have been downloaded to the clients computer from anot...

When I minify css or js, why isn't it all on one line?

I understand that minifying tries to reduce file size by removing whitespace characters. Sometimes things end up on one line, but more often than not, there are multiple lines. I noticed that line breaks happen wherever spaces occur. Wouldn't it be better just to have it all on one line? ...

Best practices - Only download CSS you need, or use a minification process?

In the context of improving overall site performance (downloading and rendering speed) there appears to be a contradiction between the following two best practices: Only bring down the CSS that you need for the page being viewed. (Because too many CSS rules cause slow rendering) Always minify CSS and combine it into one file. (Because ...

Is there any point to JavaScript minification if you have compression turned on?

If your website has deflate/zip compression enabled is there any point to JavaScript minification? My theory is that the difference between a compressed minified JavaScript file and a compressed unminified JavaScript file is negligible. There are very few browsers left out there that don't support compression. I would imagine that some...

JavaScript minification of string literals?

I was looking over some of our JavaScript compression and noticed that no strings that aren't object property names are minified into variables. For example, let's say I have these two pieces of code in my script: alert("Wrong answer"); alert("Wrong answer buddy"); The minification we get from YUI and Closure, if I'm not mistaken, is...

Minify & Gzip vs Google CDN

Should I minify/gzip my Jquery with my other scripts on my page, or use Google CDN for Jquery & JQuery UI and gzip my own stuff. From what I can see its more likely to be faster to deliver from Google and there is a better chance the files will be cached already on the users machine, however its a couple of extra http request and atleas...

Permission error when minifying JS/CSS from MSBuild output

I’m adding a post build task to run the Ajax Minifier (ajaxMin.exe) whenever a relase build of a project is conducted. I’ve added the code to the project to compress all CSS and JavaScript, but when triggering a build on the TFS build server I get lots of build errors in the BuildLog.txt with the message: error : The Microsoft Ajax M...