Joining and compressing all javascript files together - good idea?
- by Tomáš Zato
Curently, I avoid loading any unnecesary scripts on individual pages of my site. I have a class that remembers all javascript files that were requested during PHP processing and adds them to HTML.
I was just thinking that I could merge the current set of files, save the result in special directory and let the browser download just one, big file. Since the number of possible combinations is not very high, I would end up with about 10 combined files for different pages.
I've never seen that on any site. What are the reasons not to do it? I need very fast page load.