On Wednesday, July 18, 2012 5:08:13 AM UTC+2, Joseph Lust wrote:
>
> Thomas,
>
> The Groups page source is a fun read.
>
> Question for you, is there a certain compiler flag that can be used to 
> inline the CSS/JS (bootstraping - I see the code in there for injecting 
> <script> tags) into the page like is done on Groups?
>

You'd do that in a linker (to generate the HTML host page).
 

> The CSS adds to the load time, but if it's small enough, must be a win in 
> the long run. Inlining the bootstrap script makes since given that it's a 
> nocache file. I was thinking this would be neat for the compiler/Maven 
> plugin, but assume it is a bespoke internal Google solution.
>

I've been inlining the *.nocache.js file in my HTML host page with a simple 
@include JSP directive.
You have to include a special gwt:property meta then to tell the script 
where to find the permutations' scripts (have a look at the sources for 
Groups ;-) note the "standalone::" prefix is the name of the module, so 
that the gwt:property only applies to it –in case you have several modules 
in the same page–)
 

> Another neat bit about the Groups pages are the extra headers added:
>
>    1. x-content-type-options:
>    nosniff
>    2. x-frame-options:
>    SAMEORIGIN
>    3. x-ua-compatible:
>    chrome=1
>    4. x-xss-protection:
>    1; mode=block
>    
>
> I'd never used these before, but I'll consider the security features now. 
> The user agent flag makes me think that there is no permutation 
> bootstrapping going on in the page after all, but rather server side, 
> however there is still the bootstrapping code in the page. Odd.
>

Yes, they don't use a client-side selection-script, they use server-side 
negotiation (they generate a <script> pointing directly to the appropriate 
permutation script). The CrossSiteIframeLinker (xsiframe) is modular enough 
to allow it, but it requires a bit of coding (starting with extending the 
CrossSiteIframeLinker and overriding a few methods). I haven't yet dug deep 
enough so I don't know exactly what would be required.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/6-ckzl3sfbAJ.
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