Implement server-side GWT permutation selection

Rather than downloading and evaluating a large $module.nocache.js
page into the browser, perform the module evaulation on the server
side using the HttpServletRequest's headers.

In the case of Gerrit Code Review, which only has the 6 standard
browser permutations, the $module.nocache.js file is 5179 bytes.

Performing server side selection and inlining the result into the
host page completely removes this HTTP request, its local disk
cache space, and the network transfer costs.

The server side selected host page, including a single theme
stylesheet reference, is about 519 bytes larger than the same
page using a <script src="$module.nocache.js"> reference.

Change-Id: I9ae530fe7a3b32f14f29440736644e9e32d28f0c
Signed-off-by: Shawn O. Pearce <>
7 files changed
tree: 7ae555331a3885deb998834252fc188f9e68dc6d
  1. .gitignore
  2. .settings/
  4. GoogleFormat.xml
  5. pom.xml
  6. src/