> Are you counting fetching the host HTML page? With this approach, the > selection script is done away with but you still have a fetch for the > compiled script so that it can remain permanently cacheable. You could > theoretically inline it into the host page, but since none of that is > cacheable that would only make sense for very tiny compiled outputs.
I don't think firebug counts the initial request to fetch the host page, so two requests. One for the nocache.js and another for the cachable HTML. With the inlining of the nocache.js file, you could get it down to 0 requests if the retrieved page is cached forever. Are you saying to inline the generated JS in the host page too? How could you do that? Don't you need the selector script to pick the correct compiled version? Maybe I'm just not understanding what you mean. > 2 requests is very impressive, Arthur! This is the sort of conscientiousness > (i.e. for optimizing user experience) I hope all GWT developers would strive > for. Nice work. > And yes, we'd like to help you get that down to 1, too. Thanks Bruce! But it's really all thanks to Bob's ClientBundle :) -- Arthur Kalmenson On Fri, Aug 7, 2009 at 9:57 AM, John Tamplin<[email protected]> wrote: > On Fri, Aug 7, 2009 at 9:43 AM, Arthur Kalmenson <[email protected]> > wrote: >> >> I'd love to see this in the trunk too. We have only 2 round trips on >> start up now, thanks to ClientBundle. Getting it down to one will be >> very slick! > > Are you counting fetching the host HTML page? With this approach, the > selection script is done away with but you still have a fetch for the > compiled script so that it can remain permanently cacheable. You could > theoretically inline it into the host page, but since none of that is > cacheable that would only make sense for very tiny compiled outputs. > > Note that there is a cost, as your host HTML page now can't be cached (since > the selection script essentially runs in the server). If your host page is > complex, this may be a net loss. You could try leaving it cacheable but > setting Vary headers for the pieces that you use to make the decision, but > my understanding is that many caches do not handle this properly. > > Also, you cannot use any deferred binding properties that can't be > determined by the HTTP fetch of your host page. > > -- > John A. Tamplin > Software Engineer (GWT), Google > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
