Hi Matthew,

> 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.

I was thinking along the same lines at first.  But then the guide
says, "You want to put the GWT selection script as early as possible
within the body, so that it begins fetching the compiled script before
other scripts (because it won't block any other script requests)."
https://developers.google.com/web-toolkit/doc/latest/DevGuideOrganizingProjects#DevGuideBootstrap

So best is top of body.  But why not even earlier in the head?

Michael


> 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.)

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to