DEV Community

Discussion on: Painless way to detect if your Vue app is offline 😎

Collapse
 
drewtownchi profile image
Drew Town

I was curious as to how v-offline was working under the hood and it looks like it is using the Window.Navigator object which I had never heard of before. Then it seems to listen to a few events and update the isOnline status based on those events the browser fires.

That was a fun little rabbit hole. Thanks for sharing!

Collapse
 
wakeupmh profile image
Marcos Henrique • Edited

I believe that it implements some event listeners along with the observes of vue to do this behind the scenes, thank you for reading, it made my life a lot easier, the navigator is a hand on the wheel for several methods at a glance here If you want know more about 😀