How to detect DNS lookup error in JavaScript

I was wondering if there is a way to detect a DNS lookup error in JavaScript.

Is there some kind of code or some kind of trick?

or is this mission impossible?

Can anyone shed some light on this? Thank you so much!

+5
source share
1 answer

It is not possible to accurately predict what behavior will occur if the DNS lookup fails on a random end-user machine.

For example, many ISPs return their own “secondary” search pages / sites when they search in a non-existent domain (NXDOMAIN). This is also called DNS Hijacking .

" ", " ".

, , . , , .

+1

All Articles