Nearata Version 1.0.1 - 2020-08-08 Fix Fixed a bug where, on route changes, two alert are spawned instead of one
luceos Out of curiosity isn't this extension firing xhr requests every second to check the online status? Wouldn't it be far more reliable and fast to hit the api if flarum instead? And check for just the response status code?
Nearata luceos Out of curiosity isn't this extension firing xhr requests every second to check the online status? Yes it is luceos Wouldn't it be far more reliable and fast to hit the api if flarum instead? And check for just the response status code? I thought about that, but what if the site itself is offline?
Nearata katos The purpose of this extension is to tell the user if his internet connection goes down, not of the site he's on. So, i think that using an external source is more reliable.
matteocontrini Nearata looking at the code it runs 2 HTTPS requests and one DNS request through the is-online module every single second, with a timeout of 5 seconds. This is way too much in my opinion. It's something like 2 KB of data each second...
Nearata Version 2.0.0 - 2020-08-11 Changed Using WebSocket instead of is-online library Removed is-online dependency
GreXXL Justman10000 there is also another extension for this functionality: https://discuss.flarum.org/d/30714-offline-indicator