In case you’re wondering, I can and do alter the result with my own accept list (otherwise blocked domains whose requests I don’t want to prevent) and redirections (which allows me to write this article and check the result on, which actually points to my own machine). I use Steven Black’s “hosts” project, a python script, to cram them into a single 2MB hosts file containing more than 70k domains. Fake news websites, gaming platforms, pornographic hubs, encryption pages, fraud attempts, and scams are all patiently identified and listed in open access files.
Cool people have been doing this for years, sharing their host files. There is nothing new in what I am describing here. So basically, if someone makes a list of all the domains where bad things happen, we can redirect them all to 0.0.0.0 in our hosts file, and make our own Web a much cooler place. Easy peasy, throw it on the wrong track by associating the domain to an unspecified address like 0.0.0.0. Now, let’s say that you don’t want this process to find the resource on the domain. Every time a process on your computer needs to access a resource on the Internet, it first goes through the hosts file to find out where to find it. Most of the time, I’ve collected the address of the people to whom I want to write in my personal address book. I don’t know about you, but I never use a phone book. And the phone book, called a DNS, resolves the IP address for the browser. How does your browser know which IP address to contact? Well, the browser simply asks the Internet phone book. Now think about accessing a webpage, like. Whenever your browser interacts with a website, it actually requests a server, located through its IP address, like 185.31.40.11 (IPv4) or 2a00:b6e0:1:20:2::1 (IPv6). The computer file hosts is an operating system file that maps hostnames to IP addresses. The AdBlockers can’t do anything about that. Copy link from bellow and paste at the bottom of your open host file in notepad. STEP Three: Now its time to edit host file using notepad. Open a “Terminal” and type: sudo nano /private/etc/hosts. To block adobe from phoning home you need to modify your hosts file: on a mac. Yes, I’m talking about you, you naughty boy). Sometimes, you can even see the ads displayed in your UI ( Hello, Skype. Most mainstream applications are as crammed with trackers as your next media website. The Web is requested from everywhere in your computer. But the web is not confined to your browser, is it? Some are doing better than others, and whole browsers 1 have been conceived over the idea of blocking unwanted content, and are doing an incredible job. They often increase the amount of memory and CPU cycles used by your web browser, slowing your browsing experience instead of boosting it. Unfortunately, as for the UX, AdBlockers don’t deliver. They offer a quick and simple solution (most of the time, a browser extension) that blocks most of the unwanted content.
Most sites are full of trackers, ads, and lots of other nasty stuff penalizing websites’ loading.
In that case, my answer is always the same: the lowest hanging fruit is most certainly the hosts file.
Sometimes, they also ask me how to improve the Web’s performance on their own machine, for their own browsing experience. GitHub Gist: instantly share code, notes, and snippets.Īs a field expert, people often ask me how to improve websites’ performance.