HTML and CSS Reference
In-Depth Information
Minification - The
minification process trips out all white space and comments making
the referenced files as small as possible.
Prior to Visual Studio 2012, both of these were a manual process that you would need to do with each build.
Now, as I will show you, much of this work is done for you. First, let's see how the current page works without
Run your application. You can verify the files that were downloaded by using the Developer Tools in the
Chrome browser. Click the wrench icon at the top of the browser window and select the Tools Developer tools
links to display the tools pane. You could also use the Ctrl + Shift + I shortcut. Select the Network link to see the
server requests. Refresh the page to see the network traffic, which should look like Figure 5-10 .
Figure 5-10. Viewing the network traffic
This graph lists the files that are downloaded from the web server. As you can see, it's a pretty long list.
The first file listed is the html document. The rest are JavaScript or CSS files referenced by your page (or the
master layout page). Your three files, Sample.css , controlWorker.js , and controlSharedWorker.js are shown
near the end of the list.
To simplify this demonstration, edit the _Layout.cshtml view to remove the standard references. You don't
need them for this application. Comment out the referenced files by adding the code shown in bold:
Search WWH ::

Custom Search