I\'m trying to use Javascript to detect if a web browser supports websockets, but using only feature-based detection, I\'m getting false positives, so I added a user agent t
I think the Modernizr library is what you are looking for: http://modernizr.com/
Once you include the library on your page, you can use a simple check like:
if(Modernizr.websockets){ // socket to me baby }