My understanding is that when the browser sees a <script> tag, it needs to block until the script resource is available before it can resume parsing and displaying the rest of the page's contents. Putting the <script> tag at the end helps avoid this so the page renders faster.
Now that HTML has the async script attribute<http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#attr-script-async>, that would be another option if you want to keep your script tags in the header. (Note that there's a semantics difference since scripts might execute out of order depending on caching and network speeds.) On Wed, Nov 7, 2012 at 5:00 PM, Michael Allan <[email protected]> wrote: > Why place the boot script in the document body, instead of the head? > > https://developers.google.com/web-toolkit/doc/latest/DevGuideOrganizingProjects#DevGuideHostPage > > https://developers.google.com/web-toolkit/doc/latest/DevGuideOrganizingProjects#DevGuideBootstrap > > I've ignored the instructions and placed it in the head (std, xs and > xsiframe linkers) with no apparent problems. What am I missing? > > -- > Michael Allan > > Toronto, +1 416-699-9528 > http://zelea.com/ > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
