← Back to context

Comment by bevr1337

8 hours ago

I have been naively using example.com in the browser. WHATWG URL throws if there is no origin when constructing the URL. Web apps that need to construct _just_ the pathname must go through this song and dance. `new URL("/blah", "https://example.com").pathname` This isn't relying on any external example.com service but I'm learning the lesson.

I use amazon.com. Being able to ping some near-universally-available responder address doesn't mean you've got general internet connectivity, which connecting to amazon.com is a good proxy for.

  • Interesting. I'm intending not to reach out it in my case. The goal was to find a safeISH default parameter when constructing a WHATWG URL only for its pathname.

    I've seen google STUN servers used in production. Folks probably rely on unpkg too much to deliver their JS. Good to consider these failure modes.

    If your service runs on AWS, reaching amazon dot com seems somewhat more reasonable an internal health check.