Wednesday, November 3, 2010

Re: Load GWT application in hosted page

yslow ( http://developer.yahoo.com/performance/rules.html ) people
recommends to put all js that you can at the bottom of the page:

"The problem caused by scripts is that they block parallel downloads.
The HTTP/1.1 specification suggests that browsers download no more
than two components in parallel per hostname. If you serve your images
from multiple hostnames, you can get more than two downloads to occur
in parallel. While a script is downloading, however, the browser won't
start any other downloads, even on different hostnames. "

If you have only one script file and your hosted page content is not
too large, dozens of images, css files , etc. (loaded statically) is
not necesary to put your js at the bottom.

More here http://developer.yahoo.com/performance/rules.html#js_bottom

On 2 nov, 12:24, hezjing <hezj...@gmail.com> wrote:
> Hi
>
> From the GWT documentation, I see two different ways to embed the GWT
> application:
>
> 1) Within the head element:
>
> <head>
> <script language="javascript" src="calendar/calendar.nocache.js"></script>
> </head>
>
> 2) Within the body element:
>
> <body>
> <script language="javascript" src="calendar/calendar.nocache.js"></script>
> </body>
>
> What is the different between these two methods? Recommendation?
>
> --
>
> Hez

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