HTML and CSS Reference
In-Depth Information
Node.js is only a solution to this problem however if clients connect directly to it. Many
IT infrastructures proxy all requests through a proxy server in a less secure area of their
network (often referred to as the DMZ), and therefore the use of Server Sent Events could
still cause issues if this proxy server was incapable of handling long-lived connections.
The second problem can be mitigated with error handling. If the underlying connection is
closed by a firewall, an exception will be raised which the client can listen for:
eventSource.onerror = function(e) {
console.log("EventSource error occurred");
When an error occurs, the EventSource can be re-established with the server.
Due to the fact that Server Sent Events are HTTP based, it is possible to provide Polyfills
for browsers lacking support based on COMET techniques, but obviously these suffer from
the same limitations as current COMET based techniques.
Search WWH ::

Custom Search