4. Working With Browsers

Even if generating browser-independent code is one of GWT’s main selling points, there still remain some details you need to be aware of—hopefully without having to go all the way to producing browser-specific code!

First, you need to pay special attention in case the user wants to go back to a previous screen by using the Alt+Backspace combo or the Back button in his browser. Because GWT applications run in a single screen, that action will probably log the user out of your program.

Then, in some cases (such as deciding whether to show a video by using HTML 5’s tags) you might need to be aware of the specific version of the user browser; we’ll see two solutions for that, a classic one you surely already know, and a better ...

Get Essential GWT: Building for the Web with Google Web Toolkit 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.