Fengist explained what I meant. No idea if you can make a TCP handshake happen in Construct/JavaScript but if you could then that would be good.
My point about using example.com
is that it is one of four special domains that are specifically reserved for when you need a real domain, that works, but doesn't actually do anything.
example.com
example.net
example.org
example.edu
You could use a domain that's probably always there, but this is better. I've never known it return anything other than a 200.
You could use an endpoint you host, which means you can have control and responsibility of keeping it available.
The acid test for choosing whether to use you own endpoint or to use example.*
is this: Do you want to test whether the internet is accessible, or do you want to test if your specific resource is accessible?