Well, you may ask yourself why your code organization scheme leads to this setup, and whether it causes maintenance or understanding problems, but I donβt think itβs strictly βbadβ. Now, if your <script> tags are actually retrieving individual files from the server, then it is a good idea to shorten them.
The browser parses and interprets the script tags so that other work stops, so the Javascript blocks at the top of the page can slow down if they do a lot of work. However, it is true whether you have a large block of code or several small blocks.
The advantage of moving to separate script files is that you can reuse code on multiple pages. When you do this, it may be easier to compress your scripts with YUICompressor or another similar tool during build time.
Pointy
source share