Home  > Resources  > Blog

How do I reduce CSS/HTML/JavaScript footprint in Visual Studio?

November 13, 2015 by Faheem Javed
Category: Microsoft

Creating SPAs, AJAX enabled apps definitely speeds up web applications. If you want to take performance to next level then you can reduce the CSS/HTML/JavaScript footprint. The smaller files web browser has to download the faster performance will be. If you are using Visual Studio then you can download VS Web Essentials for free. After installation just go to any web project where you have CSS/HTML/JavaScript files. Here’s a sample project:


Right click the files and use Minify File. It will generate minified version of these files, provided there’s no syntax error.


Just make sure you reference .min version of js and css files.

Magnification happens on the fly. On day to day basis you will still modify regular .css/.html/.js but you will reference and deploy minified version of these files.

In case if you want to stop minifying a file just right click it and select Remove from bundling… option.

When it comes to web site performance size does matter. Good things come in small packages.

Follow Us

Blog Categories