Interesting podcast by Scott Hanselman and Nicholas Zakas:
- In the <head> tag
- Before the </body> tag
- After page load (windows.onload DOM ready function)
- On demand (when user clicks a button, mouse is 100px from button, user types first letter etc.)
For performance reasons, use 4, then 3, then 2 and if you can’t do without, use 1.