WebSockets Disabled by default for Firefox 4
cometdaily.com
cometdaily.com
Of course, we're not going to get ubiquitous WebSocket support until Internet Explorer 10 becomes the new IE 6, which I doubt will happen for a long time. Even so, Firefox could make a big difference here. It would be nice.
"Once we have a version of the protocol that we feel is secure and stable, we will include it in a release of Firefox – even a minor update release."
It's already hard enough to write modern web-apps that work across a multitude of browsers either replicating features with crappy techniques in the older ones or being given the capability to degrade gracefully. Now, a feature that was expected on modern browsers now doesn't exist on some of them.
Yes, I understand that there are security concerns, but it was concerns like this that lead browser makers to disable cross-domain JavaScript rather than implement a solution to do it securely. I hope WebSockets doesn't end up going the same way.
For cross-site scripting, there are many ways this could be enabled. Like the way Flash does it, for example, by placing a file at the root of a domain which specifies all the other domains it is allowed to talk to. Providing a manifest like this is likely the simplest solution to a problem that makes designing thick-clients quite annoying.
I'm not sure what proxies are doing involved in sockets at all. I do not see what useful thing you can do with a proxy, except maybe flat-out block web sockets. They can't meaningfully cache, they can't meaningfully enforce policy except with the blindest, stupidest of approaches that should probably be in another layer anyhow. There's not enough structure in a raw socket connection to do anything with, what structure is there could and should be managed by your router.
I'm sure there's some massive problem I'm missing here. (Though if it's "users can't use websockets through a proxy", frankly, I don't really see that as a problem that has a solution. By the time you fix up your "proxy" to allow "essentially arbitrary socket connections" what you've got there is a "router". If you're in an environment where you actually must use a proxy for some reason, you're in an environment that is probably going to ban arbitrary socket connections anyhow.) Now's your chance to enlighten me, I guess. I'm not trolling here, I do believe this, but I'm interested in the answers people give too. Maybe someone will convince me. (No joke.)
You're right that most enterprises would never be OK with "allow arbitrary outbound socket connections", but most of the people building WebSockets applications don't want arbitrary outbound sockets; they just want an HTTP connection with finer-grained control over I/O.
I suppose if there are enough broken proxies out there that can't handle WebSockets, it's better not to take the blame from all those IE6 corporate types for breaking their Intranets.
Not necessarily. For example, an SSL-encrypted connection would need the proxy to get out of the way. The defacto standard for this is HTTP CONNECT [1]. I understand there's a proposal to switch WebSockets to an HTTP CONNECT-based handshake.
[1] http://www.web-cache.com/Writings/Internet-Drafts/draft-luot...
I see the political concern in your followup, but you didn't actually rebut the paper. It's an EKR-endorsed protocol security paper; my bet is, they're right. The problem statement certainly makes sense (browsers and proxies, both critical to Internet security, are not evolving the HTTP protocol in lock step).
Meanwhile all of the alternatives that are being debated in the IETF are different from the WHATWG version that is deployed in some browsers today, so even if Mozilla did ship Firefox 4 with WebSocket, that version is already obsolete; we know there will be a replacement but we don't know exactly what it will be.
Anyone familiar with security and websockets?
edit: I'm using websockets in a few projects (gracefully degrading to flash or XHR), and I'd like to know whether I should reevaluate webSockets.
edit2: according to this mailing list, it's an issue with how proxies handle the HTTP Upgrade header. Awesome.
http://www.ietf.org/mail-archive/web/hybi/current/msg04744.h...
It's pretty weird that they consider this a problem with websockets.
Let's all be clear that the "fault" lies in crappy HTTP code deployed in middleboxes (and that includes mine), but pragmatic in understanding that that doesn't matter; browsers can't become roving exploits for proxy bugs just because a standard says so.
another checkmark on a long list of frustration with firefox 4.
Websocket protocol is perfectly fine. What's insecure are broken proxies.
Secondly, I didn't actually say websockets were insecure; I said if they were, then Firefox is sensible not to include them.
Third, even if the websocket protocol is secure in theory, if the majority of proxies don't correctly implement the upgrade header, then using websockets is insecure in practise.
For example, apps like Etherpad or Apache Wave need to send messages for each editing operation (e.g. keystrokes), and it would really suck if they had to open a new HTTP connection for each one and do long-polling to receive from the server. Websockets make this sort of thing simply a matter of sending and receiving on a socket. Easy.
You can fake them with something like Socket.IO, if you want the API and are willing to tolerate unpleasant performance on browsers that don't support it.
I'm using Socket.IO and while I'd rather not have to degrade to Flash for Firefox, if that's what I have to do to get support for Firefox users that haven't enabled websockets, I can live with it.
The only difference is that with the WebSockets the ugliness is hidden from your daily programmer via a nice API.
But I'll still going to stick with the fact that they are ugly hacks.
The API is not the only difference between HTTP and websockets. HTTP follows the request response pattern. A websocket is a pair of message streams.
People refer to it as "TCP for for the web", but it is more than that since it specifies framing as well.
Then why release? Why release a product that is clearly not ready? Think about the developers for a second!
Additionally: Nochum's comment is concerning, if accurate:
>This is gonna suck since the feature detection will be totally thrown off.
>E.g.:
>if (WebSocket in window) > ...
In Mibbit, the code is something like this:
if(WebSocket in window) {
tryWebsocket();
window.setTimeout(function() {
if (nothingHappened()) useComet()
}, 5*1000);
} else {
useComet();
}
Where comet in this case is keep alive long polling XHR.I find 5*1000 most readable in my source code though.
Feature detection first, connection detection second, then start degrading the transport until all options are exhausted.
From: http://hacks.mozilla.org/2010/12/websockets-disabled-in-fire...
"Once we have a version of the protocol that we feel is secure and stable, we will include it in a release of Firefox – even a minor update release."
I like Chrome's silent updates, but the only real difference between it and Firefox is that Firefox informs the user that the update is being applied. Other than that, I'm not sure what you're referring to.