The following table shows a comparison and conclusion of how the three major techniques and standards described in this chapter compare to each other:
Subject |
SSE |
WebSockets |
Long polling |
---|---|---|---|
Error handling |
Build-in support for error handling |
Almost no error handling in case of chunked transfer | |
Performance |
Usually results are better than long polling and inferior to WebSockets |
Best performance result compared to the other two solutions |
Small CPU resource but idle process/thread per client connection, limits scalability and extensive memory usage |
Browser support1,2 |
Firefox, Chrome, Safari, Opera |
For RFC 6455: IE 10, Firefox 11, Chrome 16, Safari 6, Opera 12.10 |
All current browsers support this |
Browser performance |
Built-in support in browser, small amount of resources |
Built-in support in browser, small amount of resources |
Complicated to get the performance right specially... |