I always thought you were supposed to add javascript at the end of the doc so the HTML isn't waiting for JS loads to render.