Hi, Server side script selection would solve a number of problems for us. First, it would allow us to transparently make deferred binding decisions based on data we have saved for the current user, ie pick locale, theme, and role, as opposed to doing the same thing via HTML meta tags, which is messy (and might offer a small security vulnerability*). Second, since we have to do user agent sniffing on the server to warn older browsers about potential display issues, we can find both user.agent and formfactor settings from the UA string. Third, this will eliminate the If-Modified-Since checks for the client side selection script, improving page load time by atleast 100ms but usually closer to 150ms (with a primed cache). Also, as a performance geek, that extra HTTP request really really bothers me :)
I already have a linker in place to map permutation variables to an MD5 strong name inspired by the conversation here<https://groups.google.com/forum/#!searchin/google-web-toolkit/server$20script$20selection/google-web-toolkit/J_EVK1fv4Zs/LwU9rQPBVQQJ>. The resulting file has a lot of rows looking something like this: safari-en_CA-user-elegant-desktop=E4BD0CBC2D17355D08286E7CF79FF120 So I can easily determine which script I need to serve. The only thing is I'm not sure how I actually serve the script file. I'm also not sure if the selection script does anything more than just load the file. Is it just a matter of my jsp generating this in the html: <iframe src="<Correct MD5 name here>.cache.html" style="<hide frame>"> </iframe> Javascript isn't really my thing, so the things I've seen in the client side selection script are fairly confusing. So, in summary, my questions are as follows: 1) What HTML do I generate to serve the code file after determining which one is appropriate? 2) Does the selection script set up state thats later used by the downloaded code file? 3) Would the iframe snippet I have above work, or fail epically? 4) If I figure out Question 1, can I use the same method to serve "hosted.html", thus keeping dev mode working, or would I need to maintain my javascript property providers? * I'd really prefer if we didn't expose things like <meta name='gwt:property' content='role=user'/> in our html that we send down though. This isn't actually a security hole, because all of our exposed service endpoints on the server check roles anyways, just a cleanliness issue more than anything. Changing this value might allow users to look at admin ui, but won't let them view/change anything. -- 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/-/ODjCbg3kz2sJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
