Have been looking around for some time now and didn't seem to find a solution that worked for me. I'm newbie regarding javascript (only done basic JAVA) but that haven't kept me from trying >D
I have to check whether a site exist before opening it. This is an example of a site not working:
I tried this answer, but couldn't make it work. I notice that the tab in chrome does not have a header name like 404
or 404 Error
. So was thinking if I could read other info from the site. Can I read the
<h1>404 Not found</h1>
from the web site in the background and if it does not equal this string then direct the user to the site?