I'm trying to find the best patterns for javascript usage in my sites, and in doing so I tend to look at source code at some sites (meetup.com, facebook.com, etc). One thing that sticks out at me is the fact these sites seem to compress all of their javascript and place it in the actual page rather than using a <script src="...." type="text/javascript">
My question(s):
1: How are they compressing (or how would one compress) the javascript? Should I use YUIcompress on every page call?
2: What is the benefit of doing things this way rather than importing separate scripts? I would think the separate scripts would make the page itself load quicker.
Thanks