SignalR can support websockets if IIS and your browser support this, if not it uses longpolling. Using SignalR will save you a lot of time reinventing the wheel, they have proven that you can create a good chat website with it. — From here.
4: What web browsers support Web Socket? (Unfortunately until IE 10 support Web Socket, but Chrome and Firefox support it much earlier )