1. First to see, without merging JS, the transmission volume is large
1.1 Create a "basic" MVC Project
Then create a new controller HomeController, because JS will be used in many views, so at this point we add a view with Layout page index view. To better see the effect, we remove something that will affect the effect.
Code in 2.2 View, ultra-concise
2.3 Start Test
Run the view, and then monitor the sent requests in HttpWatch
Found, this request index.cshtml view, a total of four requests, and see the data size of each request
"View Compressed Size: 574byte"
"JS Total size: 267676+39920+17056=324652"
2. Start merging JS, the transfer volume is small
2.1 Layout pages, and the code in Bundleconfig are as follows
2.2 View page, as follows
2.3 Start Test
"Size of view page compressed: 592byte"
"JS Pass Size: 52042byte, obviously small"
3. Merge css, merge JS with
MVC Series Learning (13)-Merging JS and CSS