If you are building a website with 10 pages and using uglifyJS to minimize and concatenate all javascript code into a single file, what is the best practice for code optimization around the world?
Say, for arguments, all pages have a common code and have a unique code. Do you include all the code in one miniature javascript file and include code that will not be used on every page? Or should you create an additional miniature javascript file for each page with unique code?
I know that the best choice is probably unique to each site, but if there is a general rule that applies, I am curious to know what the best approach would be.
source share