You can also do a text check to see if the page has loaded. E.g. after loading a page do a text check for 'Copyright 2013 blabla' or other consistent text on the website to see that it loaded. If the proxy is dead or the page didn't load for any reason the text check will fail. If it fails, exit.