Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

OS=Debian squeeze, browser Google Chrome 15.0.874.106

I use the hosts file to block unwanted sites, especially ad sites, from loading into the browser. In Iceweasel/Firefox you can block "unable to connect" error messages by going to "about:config" and setting "browser.xul.error_pages.enabled" to false. Is there a way to get rid of the unwanted error message ( "This webpage is not available" ) in Google Chrome?

share|improve this question

1 Answer 1

If you are adding unwanted sites to 127.0.0.1 (I do the same thing), you can try running https://gist.github.com/719843 in the background on port 80 with the flags --port=80 --code=200 and change the line:

server_address = ('', int(options.port))

to

server_address = ('172.20.0.1', int(options.port))

So that it only listens to localhost. It will return 200/Ok for any request with a blank body. This way, you don't get an error message, but just a blank, and you still get "unable to connect" error messages from other sites when it is legitimate.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.