Skip to content

Instantly share code, notes, and snippets.

@chumpy
chumpy / UserAgentUtilsClient.java
Created January 29, 2012 00:02
Using user-agent-utils
UserAgent userAgent = UserAgent.parseUserAgentString((String)request.getHeader("User-Agent"));
String browser = userAgent.getBrowser.getName();
String os = userAgent.getOperatingSystem().getName();
@chumpy
chumpy / QueueRPCRequests.markdown
Created January 28, 2012 23:28
Queue RPC requests in GWT

Queue RPC Requests in GWT

The Problem

One of the handier tools in the GWT toolbox is a built in AJAX framework referred to as RPC or Remote Procedure Calls. Here’s the thing: Internet Explorer version 7 and prior is not awesome. IE pre-8 restricts the number of simultaneous XmlHttp requests to two for a given host. In most cases, this restriction doesn’t pose a real problem. For a rich client application (like the kind GWT is a good choice for) that may be leaving one of those two allowable connections open for a long poll while