title: Check to see if WebSocket is hixie client-side?
body: <p><a href="http://en.wikipedia.org/wiki/WebSocket#Browser_support" rel="nofollow">According to Wikipedia</a> most browsers use <code>RFC6455</code> or a slightly earlier version with an almost identical handshake. The server I'm using only supports <code>RFC6455</code> or similar, where it accepts <code>Origin:</code> or <code>Sec-WebSocket-Origin:</code> depending on the specified version.</p>
  
  <p>Safari 5 and iOS 5 uses the hixie version of <code>WebSocket</code>. I normally fall back to long-polling if <code>WebSocket</code> is missing. Safari 5 has a <code>WebSocket</code> object, but the handshake is vastly different.</p>
  
  <p>Is there any way to detect if <code>WebSocket</code> is hixie, or belongs to Safari 5, so I can ignore it without trying the handshake? Are there any ways of checking if the browser is Safari 5 without relying on the user agent?</p>