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, 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 <mike@zelea.com> 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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment