Javascript Parsing Performance?



I am trying to improve the performance of a web application. I am using YSlow and one key thing it suggests me to minimize external CSS and Javascript files for performance.

These CSS and Javascript files are served statically for each page. My concern is that the browser has to parse these CSS and Javascript files for each page. Should I compress all the CSS and Javascript files for all pages into one or should I compress separately the files for all the pages and load them separately? Any ideas?



It always make sense to compress your javascript files into bunch of them and them load them. For some browsers, the larger javascript parsing may take more time than 2 smaller javascript files and therfore, remove all comments and spaces from your javascript files (using tool like http://www.refresh-sf.com/yui/) and then compress multiple files into bunch of javascript files for fast performance.