Compressing JavaScript and CSS on The Fly

added by mceranski
2/11/2010 7:18:20 AM

46 Views

One of my favorite features of BlogEngine.NET is that it compresses JavaScript and CSS on the fly. Traditionally, most people run their css and js files through a minifier before they deploy code to production. Minifiers effectively strip out white space and comments so you can reduce the size of your files. By compressing these files you will reduce the size of each page request without impacting the functionality. Although minifiers are great, they do represent an extra step that you have to take each and every time you deploy your code. Of course, you can automate the process by using post-build events in your IDE or by developing some scripts. However, the process I am about to show you will require zero effort on your part once implemented.


0 comments