Hey Unnur,

You're right, gwt doesn't have access to the initial HTML page, but I
wonder if it'd be possible to build a linker to make that dynamically
generated page. Doesn't the linker have access to what gets generated
in the nocache.js? Theoretically you could just output a simple HTML
page that includes its contents.

Then again, if this server side selection is coming soon (gwt 2.2?),
building this linker won't make much sense. Thanks again for all the
info!

All the best,
--
Arthur Kalmenson



On Mon, Oct 11, 2010 at 1:03 PM, Unnur Gretarsdottir <[email protected]> wrote:
> Hi Arthur -
>  Are you asking if there's an existing linker for the inlining of
> your selection script? If so, no - the linker has no access to the
> contents of your initital html page.  What you need to do is, rather
> than serve a static html page, your server will have to dynamically
> generate it, by reading the content of the nocache.js file and putting
> it directly in the html which is served on the initial request.  In
> theory, if you rarely release your code, you could do this manually -
> basically, every time you do a gwt compile, manually copy the contents
> of nocahce.js into the initial html page.
>
> - Unnur
>
>
> On Fri, Oct 8, 2010 at 12:41 PM, Arthur Kalmenson <[email protected]> 
> wrote:
>> That's a great idea Unnur. Is there an existing linker for this or
>> would I have to build it (it seems like something the linker would do,
>> if I understood them correctly)?
>>
>> --
>> Arthur Kalmenson
>>
>>
>>
>> On Fri, Oct 8, 2010 at 1:57 PM, Unnur Gretarsdottir <[email protected]> 
>> wrote:
>>> Hi Arthur -
>>>  This is, and will probably remain for some time, experimental.  In
>>> order to use this, you'll need to extend the linker and change the
>>> variable - also, you'll need to write your own server code to parse
>>> the compilation mappings text file and decide which permutation you
>>> want to use.  Sorry not to have a better answer - we did want to make
>>> sure that this new linker is set up to support this sort of linking,
>>> but it is not currently a feature that we are officially releasing.
>>> FYI - if your primary concern is the double round trips, as opposed to
>>> the size of the permutation selection JS, then an easy solution for
>>> you is to simply inline the foo.nocache.js script into your page
>>> rather than requesting it using a script tag
>>>
>>> - Unnur
>>>
>>> On Mon, Oct 4, 2010 at 2:06 PM, Arthur Kalmenson <[email protected]> 
>>> wrote:
>>>> Wow, this is great! I'm guessing this means we can cut the startup
>>>> round trips to one? Is this going into GWT 2.1?
>>>>
>>>> Exciting stuff.
>>>> --
>>>> Arthur Kalmenson
>>>>
>>>>
>>>>
>>>> On Fri, Oct 1, 2010 at 6:09 PM,  <[email protected]> wrote:
>>>>> Reviewers: jgw,
>>>>>
>>>>> Description:
>>>>> Add Support for server side script selection in linker
>>>>>
>>>>>
>>>>> Please review this at http://gwt-code-reviews.appspot.com/941802/show
>>>>>
>>>>> Affected files:
>>>>>  A dev/core/src/com/google/gwt/core/ext/linker/impl/PermutationsUtil.java
>>>>>  A
>>>>> dev/core/src/com/google/gwt/core/ext/linker/impl/PropertiesMappingArtifact.java
>>>>>  A
>>>>> dev/core/src/com/google/gwt/core/ext/linker/impl/ResourceInjectionUtil.java
>>>>>  M
>>>>> dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java
>>>>>  M dev/core/src/com/google/gwt/core/ext/linker/impl/computeScriptBase.js
>>>>>  M 
>>>>> dev/core/src/com/google/gwt/core/ext/linker/impl/installLocationIframe.js
>>>>>  A dev/core/src/com/google/gwt/core/ext/linker/impl/installScriptCommon.js
>>>>>  A dev/core/src/com/google/gwt/core/ext/linker/impl/installScriptDirect.js
>>>>>  A
>>>>> dev/core/src/com/google/gwt/core/ext/linker/impl/installScriptEarlyDownload.js
>>>>>  M dev/core/src/com/google/gwt/core/ext/linker/impl/permutations.js
>>>>>  M dev/core/src/com/google/gwt/core/ext/linker/impl/processMetas.js
>>>>>  M dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoaded.js
>>>>>  M dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java
>>>>>  M dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js
>>>>>  M dev/core/src/com/google/gwt/core/linker/SingleScriptLinker.java
>>>>>
>>>>>
>>>>> --
>>>>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>>>
>>>> --
>>>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>>>
>>>
>>> --
>>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>
>> --
>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to