0

I have at least 15+ javascript libraries & references in my MVC web application project. For each of these libraries they are independently bundled and minified. This means that when a page is requested the client browser is having to make 15+ connections to the server to retrieve resources.

Would it be considered bad practice to bundle all of these related files into a maximum of say 5 bundles so that the number of requests is kept low even though the scripts have nothing to do with each other and are completely unrelated?

Grant
  • 11,138
  • 32
  • 94
  • 140

1 Answers1

0

Normally we would end up with few bundles. Some are

  • put all the scripts which are used again and again on ifferent pages as common.js

  • page type specific bundles, like in an eCommerce site we would potentially have productpage.js and checkout.js

Antony Francis
  • 304
  • 1
  • 7