Snap.com previews seem to be very fashionable these days (if you don’t know what I’m talking about, its those previews of the sites which appear when you place your mouse cursor over a link), but it is very annoying (almost as annoying as those ads which appear when you hover over certain words in the article – which supposedly are
related to the advertisement being shown). To kill this
feature, add this line to your hosts file:
Two more tips: hosts file also work in Linux (in fact they were introduced in UNIX). And finally, if you’re running a webserver on your machine (for development purposes for example), making all the disabled sites go to your webserver can be irritating (because they generate a log of 404 entries in your log file for example and you have to go through those if you are looking for an error). The solution is to redirect them to an other IP. Some IPs you can use for these purpose are:
- An unused IP address from your network if you are behind a NAT.
- An IP address from an other unused subnet.
- Any unused IP from the private IP range
One thing to watch out for is that when you use an IP address outside your subnet, the request must go to the default gateway, which rejects it (or should reject it if properly configured). This doesn’t involve a performance penalty if you’re using a personal router on your local LAN, but for example if you are directly connected to the Internet with a cable modem, this involves contacting the gateway of the cable company, which could result in a slight performance degradation. Also, if you wish to use this approach in a corporate environment, be sure to drop your IT people an e-mail to let them know what you are doing to make sure that (a) that address / subnet is truly unused and (b) that they don’t panic / think it’s an attack when they see all that traffic going nowhere.