DEV Community

Cover image for Why WhatsApp web doesn't work without WhatsApp on your mobile app?
Atul Bhatt
Atul Bhatt

Posted on

Why WhatsApp web doesn't work without WhatsApp on your mobile app?

On and off this question might have crossed your mind once in a while when you open WhatsApp on the web.

Why do I need to open WhatsApp web on my phone for it to work on the web?

I know it was so easy for this❓ to slip away because you were about to reply to an important 💬 .

But worry not I am here with an answer to that which I realized while reading the privacy policy of Whatsapp.

The privacy policy and its concern is a topic for another article first let's talk about this mystery before you jump out of this article.

Screenshot_Privacy Policy and 8 more pages - Personal - Microsoft​ Edge Dev_1

The image above has the updated privacy policy but the focus of our discussion lies in the section I'm quoting below.

We do not retain your messages in the ordinary course of providing our Services to you. Instead, your messages are stored on your device and not typically stored on our servers. Once your messages are delivered, they are deleted from our servers.

So the above statement is quite self-explanatory to why WhatsApp needs your device to be connected to the internet🌐 and WhatsApp to be opened on it.

For those who want a little depth in the explanation, the steps below are waiting for them to be read📖 by you:

The journey of messages💬

  1. You send a 💬 to someone, it 1st goes to the Whatsapp server and then Whatsapp sends it to the receiver or the person you sent it to.

  2. Once the 💬 is received by the receiver, the 💬 you sent is deleted🗑️ from the WhatsApp server which was in encrypted form and can only be decrypted on the device of the receiver.

The hidden answer

  1. Now when you try to access your WhatsApp chats💬 on WhatsApp web there is nothing that WhatsApp can get from its server as it already had it 🗑️ from there.

  2. Now my take on how WhatsApp gets the 💬 on WhatsApp web is that it sends the recent chats to the WhatsApp server temporarily and stores them till the WhatsApp web session is on. Now, these chats are delivered from the WhatsApp server to the device in which the WhatsApp web is open.

A small experiment that throws some light🔦 on the above explanation.

I have a list of messages in a group chat.

photo_2021-05-22_18-59-09

photo_2021-05-22_18-06-12

These are the messages which were on my device and when I opened WhatsApp web on the Edge Browser on my laptop I was able to see them there as well.

Now I deleted the message with the Amazon link from my device and then refreshed the Whatsapp Web page.

photo_2021-05-22_18-59-09 (2)
photo_2021-05-22_20-24-05

You might have noticed that the delete option was just delete for me.

The screenshot below shows the reflection of our actions on WhatsApp web with the same message deleted.

image_2021-05-22_18-07-20

I hope you enjoyed🤗 reading this article as much as I enjoyed writing.....I mean typing. Please comment down any questions or your views on this article you have down in the comment section of the platform wherever you find the link to this article.

Before you leave here is something you can try. Whatsapp says in its privacy policy:

If a message cannot be delivered immediately (for example, if the recipient is offline), we keep it in encrypted form on our servers for up to 30 days as we try to deliver it. If a message is still undelivered after 30 days, we delete it.

Now you can try to send a message to someone who is not using WhatsApp and ask them to install it after 30 days of sending that message. What will happen?

Stay Curious🦝 .

Top comments (16)

Collapse
 
codenameone profile image
Shai Almog

I ran into this myself why creating a whatsapp clone a while back. The end-to-end is tricky, that's why Telegram doesn't have that problem but doesn't do end-to-end by default. Signal solved this better by sending the message to the desktop app and the device at once. That works nicely and it's a better app IMHO.

Collapse
 
atulbhattsystem32 profile image
Atul Bhatt

Telegram keeps things on their server. That's also the reason why I prefer using telegram for conversation, nothing is lost.
On the contrary, WhatsApp relies on Google drive for backups and that too keeps everything in decrypted form.

Thanks a ton. If you find it informative and easy to understand then can you please help me reach a wider audience by sharing it?
It would mean a lot. And thanks for your time reading it.

Collapse
 
codenameone profile image
Shai Almog

Sure. Feel free to return a favor on my blog ;-)

Collapse
 
ryuu profile image
James Filmer

Hey there, so just a few points I might want to just bring up that I've noticed with whatsapp. Although I may be wrong.

Messages to and from Whatsapp are only ever sent to and from our phones. Strictly...

I believe and in my experience of all the platforms and integrating etc. I believe that Whatsapp web creates a secure connection to your phones Whatsapp. Messages can be seen hitting your phone first with a notification only being triggered later.

If your phone disconnects, even for a few seconds, whatsapp web simply just says it can't send the message until the connection is restored, why would that be if it were stored on their servers.

I'm inclined to believe that the secure connection/socket to your phone is held and all communication between web is albeit via whatsapp servers, strictly to your phone. It then is sent by your phone to the recipient(s).

Additionally, delete for everyone is a time limit thing, I can't remember but I think it is up to 1 hour after sending that you can delete for everyone.

And yes, undelivered messages are kept for up to 30 days before permanently undeliverable.

Collapse
 
atulbhattsystem32 profile image
Atul Bhatt

Yeah. The same details are what I observed. When I did any operations like sending messages and other operation like deleting and other no api calls were there on whatsapp web network tab.
I was planning to see the logcat of my android device where the application is installed to verify the same.

And thanks for adding on these details that makes me more sure of it.

I'll surely release another article with more into technical details.
😀😀😀

Collapse
 
sunnypranay profile image
Sunny pranay

That is very great article.

Collapse
 
atulbhattsystem32 profile image
Atul Bhatt

Thanks a ton. If you find it informative and easy to understand then can you please help me reach a wider audience by sharing it?
It would mean a lot. And thanks for your time reading it.

Collapse
 
sunnypranay profile image
Sunny pranay

Sure thing I will do that.

Collapse
 
brilliance profile image
Brilliance Oparaku

Thanks a ton
This also enlightened me on some subjects related to this

Collapse
 
atulbhattsystem32 profile image
Atul Bhatt

Oh what kind, I'm curious to know😀

Collapse
 
iamvandana_98 profile image
Vandana

Could you please elaborate a bit on the experiment part and what is analysis of it.
Thanks in advance

Collapse
 
atulbhattsystem32 profile image
Atul Bhatt

So to be honest this experiment doesn't shows the entire picture. I wanted to add more of the experiment which I did such as checking the apis and when the whatsapp web is calling. However, I'll still explain what is the intention lying under this deleting experiment.

So what I tried to do is deleting an old message from my phone which for sure is not available on the whatsapp server as per their policies.

So if I'm deleting any message there has to be a way for whatsapp web to know which message I deleted.

I know it's not that easy to digest and I've done more reasearch on it. So I'll release an another article with more technical stuff.

Collapse
 
uzair004 profile image
Muhammad Uzair

Nice 👍

Collapse
 
atulbhattsystem32 profile image
Atul Bhatt

Thanks Muhammad😀 I hope you'll share it with your friends so they can also get to know this mystery.
😄

Collapse
 
nikhilmwarrier profile image
nikhilmwarrier

Great article! Keep up the great work!

Collapse
 
atulbhattsystem32 profile image
Atul Bhatt

Thanks. Sure I'll keep writing more such articles😄