OPERA 11.5 DROID N/A OPERA 10.1 SAFARI 6.1 SAFARI 4 IE 9 FIREFOX 3.6 FIREFOX 15 LATEST VERSION WITHOUT SUPPORT LATEST VERSION WITH PARTIAL SUPPORT LATEST VERSION WITH FULL SUPPORT DROID 4.3 IE N/A IOS 9 IOS 5.1 IOS 4.1 CHROME N/A CHROME 15 CHROME 49 SOURCE: http://caniuse.com/#feat=websockets
data to 2 bytes…and reducing latency from 150ms to 50ms is far more than marginal. In fact, these two factors alone are enough to make Web Sockets seriously interesting to Google.”
Frontend Developer, not stereotyping... “How can I be assured that Web Sockets alone can single handedly save me network throughput, and thus money and headaches when coming to choose servers to deploy my platform on?”
lot of users. • Website uses long polling to check the availability of users in chat. • Website is running slowly and want to consider Web Sockets but unsure if it'll make a difference. • Average header size of this endpoint is 600 bytes per request. • Average data size of each response is 10 bytes.
80,000Kbit/s 90,000Kbit/s 100,000Kbit/s Sequential Users 5k 10k 20k 97,600 Kbit/s 48,800 Kbit/s 24,400 Kbit/s 1,600 Kbit/s 800 Kbit/s 400 Kbit/s HOW I DID THE MATHS h = header length (bytes) b = body length (bytes) u = users ((h + b) * u) * 8 / 1000 = Kbits/sec FUN FACT To achieve the same network throughput that 25,000 polling users would generate with WebSockets, you'd need 305,000 users.
data to 2 bytes…and reducing latency from 150ms to 50ms is far more than marginal. In fact, these two factors alone are enough to make Web Sockets seriously interesting to Google.”
way of transmitting data in a TCP-socket like fashion, we have the idea of sub-protocols so we can transfer specific protocols using web sockets. The Sec-WebSocket-Protocol header defined what protocols can be used.
that caches responses, since the mask is random and can't be cached (also, looks nothing like a HTTP response so caching servers won't try to cache this data)
sockets. • Due to web socket standards being around since 2008 and there being many revisions, some browsers have old implementations. • Newer implementations may be lacking.