Last 12 weeks · 0 commits
4 of 6 standards met
First of all, THANK YOU, for adding the new fallbackUrls! As I started incorporating is-online into my app, I noticed something unexpected: the seem to be running in parallel with the first request (e.g. https://ipv4.icanhazip.com). My concern with this is that it goes against the plain meaning of a , and as such people may assume (like I did) that I could use my own server as a fallback without having to worry much about the added request costs associated with pinging every 10 seconds. When I saw that it was in parallel with the first request, I needed to hunt for a public alternative that may not worry about my app's usage of that (others may not be so forgiving?) (IBTW: 'm not opposed with being able to add in as well, but that may be overkill for most use cases.) Original behavior (only https://ipv4.icanhazip.com runs): New behavior (https://ipv4.icanhazip.com + fallback url, in this case https://checkip.amazonaws.com, since it's the only one that I could get to work with my dev local server in Brave) Expected original behavior, and only fallback to fallbackUrls in parallel (along with https://api.ipify.org) when the first one fails. Thanks again!
Repository: sindresorhus/is-online. Description: Check if the internet connection is up Stars: 1364, Forks: 88. Primary language: JavaScript. Languages: JavaScript (98%), TypeScript (2%). License: MIT. Topics: browser, connectivity, detect, internet, internet-connection, javascript, network, nodejs, online, ping, reachability. Latest release: v12.0.2 (3mo ago). Open PRs: 0, open issues: 0. Last activity: 3mo ago. Community health: 85%. Top contributors: sindresorhus, silverwind, Richienb, BendingBender, johno, kevva, schneiderl, MoOx, yupkey, coclauso and others.
JavaScript
The latest Brave browser has issues with https://ipv4.icanhazip.com/ Brave treats https://ipv4.icanhazip.com/ as triggering an AD BLOCK response !Image This results in a or response. !Image This leaves is-online limping on one leg to determine online status. !Image My suggestion is to allow the user to pass in alternative fallbacks so if happens it can have some other options to try