I want to separate my JS out nicely so each object is in its own file, I’ll probably structure my directories and files like:
/js/modules/module1.js
/js/pages/page1.js
Problem is I don’t want to have like 50 HTTP requests for each file, is there a way to do this?
You can use a PHP file to serve all of them combined. This technique is used by many PHP softwares such as IP.board
In case of ASP.NET, this will help – http://abhijitjana.net/2011/10/06/bundling-and-minification-in-asp-net-4-5/