A lot of times we want to provide some sort of feedback to the user, while executing a task that usually takes a lot of time in the server. However it is not always desirable to utilize a technique like polling. Instead we can use either one of these two methods in order to update the DOM and let the user know what is going on.
I wanted to implement real time collaboration for a web application project of mine, so I started doing some research. It turns out that creating a website that is capable of real time collaboration is kinda difficult. In order to create something like that, one must use a technology like node.js and still it would be a pretty complicated problem to tackle. There are a few plugins that can help us with building an online collaboration tool but in my opinion the best by far is TogetherJS by none other than Mozilla.