Hacker News new | past | comments | ask | show | jobs | submit login
Web Sockets Now Available In Google Chrome (chromium.org)
119 points by gps408 on Dec 9, 2009 | hide | past | favorite | 38 comments



I can abandon Flash sockets if this becomes mainstream.


  ws.onclose = function() { // websocket is closed. };
someone reformatted the code without checking...


Great, with Apple, Mozilla and now Google innovating in the browser sphere, it looks like browser will be evolving at a much more rapid pace.

Gah, let's hope Microsoft gets some vision for IE too. (or ditch it like Bing ditched Live)


I agree, but I'd rather have users get some vision. You'd be surprised how many people still use IE6, even though Microsoft wants them to upgrade. Less-savvy users don't switch unless:

1. They have to (meaning their current methods no longer do anything or the software or hardware no longer works).

2. Someone more savvy does it for them and teaches them the new software. Usually this happens after #1.

Unfortunately, I don't know if there's much we can do about this kind of user. We shouldn't (and won't) have to hold ourselves back because they refuse to upgrade.


In addition to what danielrhodes says in his reply about corporate IT departments having legitimate reasons not to upgrade - I'd like to add that my biggest pet peeve is when someone asks me to see if I can fix their computer, and it's obvious that every IT-enthusiast before me has insisted that this person switch to -INSERT BROWSER HERE-. I helped a gentleman last week that used MSN because he found it intuitive, but had Firefox, Opera, Chrome and IE installed. Then there was the mountain of anti-spyware software everyone had installed. After uninstalling the browsers he didn't like or use (despite them being "better" according to most IT professionals) and uninstalling the spyware blockers, his computer worked just fine.

We need to remember that our job is to make the computer better for other people - not just ourselves. I'm amazed at the rate of development I've seen in browser technology, but let's not forget the millions of people that just want to get online and send an email. If we rush to upgrade everyone to "better" technology - we might end up ruining their experience.


My dad was in a similar camp. It had NOTHING to do with the browser, and everything to do with the yahoo! branded logo that SBC had installed for him. To him that logo is the internet.

For a host of reasons I ended setting him up with Chrome, imported his bookmarks, and changed the shortcut. Now the magic Yahoo! logo opens Chrome instead and he couldn't be more trhilled.


Eventually, those people who don't upgrade won't be able to just get online and send an email.


Most IE6 installations are in corporate environments where IT doesn't want to switch because it will break internal applications.


I hear this claim floated a lot, and I largely believe it based on anecdotal evidence, but how do we know this is really true? Has someone done a study or have a meaningful way to measure it?


I know of two enterprises (about 3000 to 3500) one and the other about 5000 hosts that still use IE6. The devs recently started using Firefox 3.0 (or something like that). Guess what their JRE/JVM version is? :-)

Edit: A quick way to verify this is to run your webserver logs through "whois" for clients with IE6.


That there are a lot of corporate users still using IE 6 is only part of the claim that that group makes up most of the IE 6 user base.


Work inside a large corporate and check the budgets for projects vs budget for IT maintenance. Upgrading browsers, as a project, has no board approvable ROI.

This will change when there are applications on the internet that corporates need, but can't access via IE6. See GWave for an example of how this can be resolved.


I think we may have to wait a fairly long while before companies will switch browsers just because of Google Wave.

Companies aren't getting onboard the usual sharing is caring experiece that most netizens are familiar with - they usually want to pay $$ to get a product (e.g. sharepoint) that provides some level of support rather than asking the users to be smart.

It may happen, but my bet is that internal net usage changes when the baby boomers have left the workplace and been replaced by people brought up in a very technological world.


I suspect most of these users just use the browser that shipped with their OS. So Windows 7 may be the unlikely saviour - particularly after the next corporate refresh cycle.


I've seem that too. Non-savvy users can and will update their MSN-messenger client if it stops working, for instance.


IMHO: Whenever Microsoft gets a "vision for IE" we get ActiveX, document.all, CSS expressions, page load speed ups by ignoring HTTP specs (ignoring cache info), etc. Let's not. I am happy with Microsoft playing catch-up and implementing killer features of other browsers instead of inventing its own: ones without open specs or standards or documentation or sense or reason.


You forgot XHR.


Are there any examples of web sockets live right now? I'd like to see it in action...


As the saying goes: "that's awesome, if only it worked on IE6..."


You can use a Flash compatibility shim to make your sites use Web Sockets in some browsers and Flash sockets in others: http://github.com/gimite/web-socket-js

This is the best of both worlds; Flash works for IE users, and Web Sockets will hopefully be available soon in plenty of non-Flash browsers (like the iPhone).


If you care about IE6 these days, and aren't selling to corporate users forced to use it, then you're doing something wrong.

Also, you can just enable it when it's available, and fallback to comet etc when it's not.


I think the main issue here is not IE6 but all the modern browsers (FF 3.5, Safari 4, IE8) that do not support this feature. Targeting Chrome users only is not that appealing.


The feature was added to webkit so both safari, chrome and other will get the feature and so is firefox https://bugzilla.mozilla.org/show_bug.cgi?id=472529


This is HTML5, they will support it soon if not yet.


That's why you would use it where available, instead of targeting.

if (browser.supportsWebSocket) useWebSocket(); else useComet();


While the numbers are falling, IE 6 users still account for a sizable percentage of the people that buy things from my site. Ignoring them would be "doing something wrong". Guess it just depends on what you're doing.


Also in case you are doing something that spreads virally, not supporting IE6 can change the viral loop from increasing to decreasing (you could lose 5% of invites/feed messages/emails/whatever depending on app).


It really depends.

I recently did a bit of consulting work for a guy who has a large number of domains receiving primarily organic search traffic. Around 20% of the people hitting those (several million a month) are still using IE6.


Won't Chrome Frame fix the IE problem?


I've implemented a Ruby version of WebSocket server (which is based on EventMachine and yet very experimental) - http://github.com/laktek/Web-Socket-Examples


The main challenge with bidirectional browser communication is really in the backend. It does not scale nearly as easy as easy as RESTful HTTP requests.

I'm sure Google has developed some serious technology to address this while building Wave. Wondering if some of it come to Google AppEngine anytime soon?


> The protocol is not raw TCP because it needs to provide the browser's "same-origin" security model. It's also not HTTP because web socket traffic differers from HTTP's request-response model.

If Websocket has something like crossdomain.xml does that mean we can build p2p applications on that?


No - it doesn't have a passive mode.


Does the WebSocket spec allow for gzip/deflating streams as well? I can't see anywhere if it does or not.


A quick Google search (http://www.google.com/search?q=websocket+compression) revealed that it's not supported yet, however it might get added in a future version: http://www.ietf.org/mail-archive/web/hybi/current/msg00789.h...


I'd like to see an Erlang implementation of a WebSocket server, anyone know if this has been attempted?


Not sure if there's one in erlang, but go has a websocket server built into the standard library:

http://golang.org/pkg/websocket/


google confuse me

how was this implemented before local storage? every current version of browsers supports it apart from chrome (and opera?)

saying that it is pretty awesome, web sockets have been a long time coming




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: