Comet is dead, long live websockets
armstrongonsoftware.blogspot.com
armstrongonsoftware.blogspot.com
At the same time though, support for WebSockets in major browsers is woefully little, with only Chrome currently supporting it in an active "release," and (I believe) support available in the Firefox trunk for a later version. This still doesn't account for Safari or Internet Explorer, the latter being the biggest impediment to adoption.
Additionally, I certainly don't think this is the beginning of the end for "AJAX" — not in the least. AJAX still has very strong grounds in pulling down data from the server that doesn't require some sort of long-running communication.
Yes, let's get excited, but a little bit of a sanity check should be done if you're ready to call AJAX "dead" (or "dying").
It seems that IE has been a consistent impediment to web based technologies for upwards of 10 years now. There have been so many other things that have been horribly crippled because 'internet explorer doesn't support it'.
People are becoming more and more savvy from the standpoint of computer use, and putting up a redirect to install a new web browser... like Chrome or Firefox... is something the majority of people should be able to handle/understand.
I'm tired of waiting 10 years to actually use the technology that we have /today/.
people dont upgrade unless they have a reason to, not because there is a better rendering engine or more plugins, by pulling your hair out and slowing yourself down to work on support for ie, you are also giving users a reason to not upgrade.
but (IT wont let you install firefox because x only works on ie6) works both ways, if the rest of the web shoots forward with these new technologies, companies will catch up.
I think the bigger issue is that Microsoft doesn't bother adhering to standards;
Or they make up their own standards when there are already perfectly good standards that provide the same functionality;
Or they implement part of a standard, but certain stuff is completely wrong, and when it is pointed out, they don't do anything about it.
And then they force you to conform their arbitrary non-standard stuff, because they can bully you with their 70% market share.
This isn't just about being slow, its about their course history of being slow AND maliciously protectionist AND incompetent.
And they should get ditched if they continue to behave in such a manner.
DOM, CSS, Box Model, Events, SVG, and a bunch of other things they did before anybody else (in a straightforward and reverse-engineerable way) were ignored by later groups who put together slightly incompatible "standards", some of which had no reference implementation. NN6, for example, was out for a full year before it implemented the W3C Events model that the Netscape team had proposed (which of course didn't exactly match the reference implementation that IE5 had in place 2 years earlier).
It's only recently that the Standards folks have managed to spec out things that the IE group hadn't done yet.
This is patently untrue. In 1999, IE was the best available browser (Netscape would have been your other option).
It wasn't until Firefox in 2005 that a real alternative emerged (IMHO).
Sorry to be nitpicky, but it matters.
I'd go so far as to say that it was 2008 before something genuinely better came along in the form of Chrome. Firefox did a good job of getting Microsoft to release IE7, but it was never compellingly better in the way that Chrome is.
Like a phone.
Orbited looks like an event-driven webserver, which is nice and all, but it doesn't magically give WebSocket functionality to legacy browsers.
For many years now, the rallying cry of the web has been "industry standards". But now, suddenly, we have redefined standard to be something like "Google said so". Sometimes Apple gets to say so.
Without apologizing for how bad IE may have been, I am uncomfortable with this turn of events for two reasons:
1. It smells like hypocrisy. A lot. 2. HTML5 isn't slated to actually be a standard until 2012. Basically requiring implementations to work to a proto-spec kind of defeats the purpose of having standards.
Let's say, just theoretically, that IE implements web sockets according to the draft. Then a day later, the Google employee who writes the draft changes it. How many hours until there's a HN post about how IE implements web sockets wrong?
html5 introduced crossdomain requests for xhr because it already proved to restrictive, and flash introduced crossdomain.xml.
I wish w3c stopped pretending that in order to stop people from doing nasty stuff, you have to stop everyone else from doing anything (also looking at you, clipboard)
This may be part of the specification that I am missing, but it seems to suggest that its using exactly the same origin model as original xhr, which is my complaint
as http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-... suggests
"The Web Socket protocol uses the origin model used by Web browsers to restrict which Web pages can contact a Web Socket server when the Web Socket protocol is used from a Web page."
and http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-...
"The first three lines in each case are hard-coded" (referring to the origin)
This is basically the same as the Cross-Origin Resource Sharing spec, another W3C spec supported by some current browsers:
http://www.w3.org/TR/access-control/
> "The first three lines in each case are hard-coded" (referring to the origin)
No, the three hard-coded lines of each handshake part come before the origin headers:
GET /demo HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
[...]
HTTP/1.1 101 Web Socket Protocol Handshake
Upgrade: WebSocket
Connection: Upgrade
[...]from a guess at the fact they specifically say they use the existing same origin policy, they cant, but the confusion is cleared up with a simple test, I will check tomorrow
I haven't tried it myself with web sockets yet, but I've done some experiments with XHR+CORS (almost the same protocol, except for different names of the response headers) and it does work cross-origin on recent Gecko and WebKit browsers.
UPDATE: Ran a quick test using the current Google Chrome beta for Linux and standalone.py from Google's mod_websocket, and successfully opened a cross-origin WebSocket connection, just as described in the spec. mod_websocket will authorize requests from any origin by default; there's a sample handler included that shows how to reject cross-origin requests on the server.
This is similar to the origin model for cross-origin XHRs (http://www.w3.org/TR/access-control/#access-control-allow-or...).
I'm using (puts on flame suit) IIS7. Are there any good tools or articles on getting Web Sockets running in IIS7. I'm a somewhat competent .NET developer, but I'm not a low level guy so something slightly above "For Dummies" would probably work best.
Except for the times when that HTTP header tells you don't need to download some huge amount of data...
FWIW, I believe the proper usage is "X is dead, long live X".
1. too obvious handshake fingerprints for a firewall to block
2. No passive mode
3. Not supported by every browser.