Game Development Reference
In-Depth Information
console.log('Server: ' + e.data);
};
A study of the protocol's security in the late November of 2010 revealed that when used with transparent
proxy servers, the transmitted data cache can be replaced, and the user will receive a version of the data
created by an intruder instead of the actual data. This quite serious issue prompted Firefox and Opera
developers to disable WebSocket support. The new draft successfully addressed the vulnerability, and
WebSocket support in these browsers was re-enabled.
Table 10-4. WebSocket: Bi-directional communication technology for web apps
IE
Firefox
Safari
Chrome
Opera
Two versions back
7.0
5.0
4.0
12.0
11.0
Previous version
8.0
6.0
5.0
13.0
11.1
Current
7.0
5.1
14.0
11.5
9.0
Near future
8.0
15.0
12.0
6.0
Farther future
10.0
9.0
16.0
12.1
What are the benefits of WebSocket?
The special protocol reduces response time by eliminating HTTP overhead.
Bi-directionality allows both receiving and transmitting.
What are the drawbacks of WebSocket?
The special protocol requires a dedicated back-end server.
Choosing a connection technology
The bi-directional and fast WebSocket is obviously the option for games, but the temporary lack of support
in many browsers and the raw character of existing servers make it a technology of tomorrow. SSE, in
turn, easily combines with Comet and has a simple format, which makes it a highly usable option today.
You must have noted that the latest version of the Microsoft browser ignores both of these standards,
calling for a special approach.
Client databases
We used to have only cookies to store data in between page refreshes, but as applications grew in
complexity, it became apparent that 4 kilobytes was not enough—not to mention that cookies have to be
 
Search WWH ::




Custom Search