Faster Web Access: A simple method

This is largely a repeat of an article in an earlier issue of the magazine. It works across all forms of *NIX (including OS X) and in a limited way Windows as well. Most professional *NIX people don’t recommend it. The reasons escape me at the moment.

One thought some network analysts had a couple of years ago as to the slow loading of web pages was due to mis-configured or slow ad servers. Visiting some pages with numerous popups and ads on occasion will seem to confirm this. Compare the some times five minute wait to how fast a simple HTML page with no graphics or ads takes and the difference is immense. I decided to see if the fault indeed belong to the ad servers. After some basic research I came up with a method to test the idea.

In the *NIX world there is a system file (/etc/hosts) which tells the computer where a particular URL is located. Additionally there is a “magic” IP address (127.0.0.1) which points to the computer currently being used. Combining this knowledge with a list of third party sites which frequently appear while my machine waits for something to load, resulted in an addition of about two dozen lines to the hosts file. Sure enough the speed of access to the core information of the web pages improved dramatically. The down side is there are segments of many web pages with “broken picture” icons.

For those who wish to try it, the syntax of the lines in the file are the IP (127.0.0.1), followed by a <Tab> or a number of spaces, finally by a list of domains separated by a single space. For simplicity I try to keep related domains on the same line and have a separate line for unrelated domains. Lines with the number sign (#) in front are comments. I suggest keeping a backup of the original file in case it needs to be restored. There are sample hosts file on the net. I advise against using them for three reasons.

  1. The speed will improve after about half a dozen domains are added to the file.
  2. There are thousands of domains in these lists. Some may no longer be up. This may slow down the machine even more.
  3. Most of these files were written for Windows and have a slightly different syntax.

With a small number of domains in the list I have not noticed many problems for the last year or so.

Please follow and like us:

About the Author

BlankMike