Answer the question
In order to leave comments, you need to log in
How can I check if a website doesn't exist with a chrome extension?
Hello!
I have an array of sites, there are inactive sites in it: not delegated, expired domains, etc. For example: sdfhbsdjnfjnn323.ru
The extension opens each site in turn and listens to the response (onMessage)
If the site is not working, then content_scripts is not loaded, and accordingly the background page does not receive any response.
Answer the question
In order to leave comments, you need to log in
The site "starts" only when it is successfully downloaded from the web server, which means you don't need such crutches with an extension in principle. Send a HEAD request to the domain, if the code is not 200 then the site is defective, you can also connect 301-302 codes if suddenly the redirect is worth it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question