Ask HN: How does web.whatsapp.com work?
It looks like a dirty hack, but works quite nicely.
However, I couldn't figure out how the webapp works:
why do I have to scan a QR code?
why does the mobile application has to be connected to the internet the whole time?
what kind of communication is happening?
is there any speculation about that?
5 comments
[ 3.4 ms ] story [ 25.3 ms ] threadThinking a bit more it could be that the messages are routed through the phone itself, and so it requires the app to be running and connected.
Perhaps the QR scanning connects the phone and the browser via some token stored somewhere and used to both authenticate and send/receive messages.
Think of the "token" as a channel. Phone sends all messages to that channel. Browser gets messages from the channel.
This is obviously not the whole picture. For example, the web app can scroll back and "load" previous messages.
It's weird though. Why would they go through such a router? It would make a lot more sense to just use the QR scanning to authenticate, and then let the browser receive messages in the same way that the phone app does: directly from the server(s).
Also, this is just an educated guess.