Can someone give me pointers on how I can minify and combine my CSS as the site I'm working on has performance issues. Also, are external JS and CSS libraries also minified and combined or left as is?
-
Also, do I need separate tools to perform the minification and combination or would one tool do?Sachin Kainth– Sachin Kainth2012-02-29 11:02:47 +00:00Commented Feb 29, 2012 at 11:02
-
Does anyone know if external libraries are usually minified?Sachin Kainth– Sachin Kainth2012-02-29 11:18:07 +00:00Commented Feb 29, 2012 at 11:18
-
You can normally tell if external libs are minified by their name, as they have "min" in it, e.g. with jQuery.Ian Devlin– Ian Devlin2012-02-29 11:56:23 +00:00Commented Feb 29, 2012 at 11:56
4 Answers
There are several convenient options for .NET, for example:
And new in ASP.NET 4.5: Bundling in ASP.NET 4.5
2 Comments
I would also add RequestReduce for .net options. It may be the only runtime bundling option for minifying external resources. Its unique from the other .net options in that it grabs the unminified content via http instead of via the file system. It can also sprite your background images.
Comments
I know this is an old question but I thought I will give a better answer (trick).
In visual studio if you do format code (Ctrl + K + D) then css will be formatted nicely for you.