HOSTS File

  • Thread starter Thread starter Lee Marsh
  • Start date Start date
Alan said:
Agree. The hosts file is a terribly inefficient method of domain
blocking - it was never designed for that, and when it gets too big
it's a downright drag on performance (as I just experienced with a
hijacked 20K hosts file). There are much better choices offered
within proxies, firewalls and browsers themselves, as you mention.
Hosts is redundant if one of these methods is used.

You obviously have something very wrong with your system. If you are using
Win2K/XP then disable the DNS Service. I'm using almost 20,000 entries at
581K with no slowdown. Browsing with or without the HOSTS file is the same
time. Faster with actually because the ads are not retrieved and eDexter
with my customized images shows it is working.
 
YoKenny said:
You obviously have something very wrong with your system. If you
are using Win2K/XP then disable the DNS Service. I'm using almost
20,000 entries at 581K with no slowdown. Browsing with or without
the HOSTS file is the same time. Faster with actually because the
ads are not retrieved and eDexter with my customized images shows it
is working.

My system is not 2K/XP. The slowdown I mentioned may have been due to
any number of factors associated with the spyware rubbish I'd been
infected with, which has now been eradicated, together with the
slowdown. Nothing appears to be "very wrong" or even a bit wrong with my
system now.

My point about the hosts file remains though. Unless the fundamental
mechanism used to access the hosts file has changed in more recent
Windows versions, it represents a most inefficient way of redirecting
domains to localhost. Some fairly extensive testing I was involved in
(comparing hosts performance against a junk filtering local proxy)
showed that hosts loads into memory from disk, *every time* it is
accessed. It can't possibly take "the same time" with or without the
hosts file, even though you may perceive it as such. Naturally, overall
browsing may well (and should) show a noticable improvement, with less
junk being downloaded. But this is apples & oranges, since now we're
comparing local I/O disk reads with internet downloading.

In addition, hosts is searched sequentially (slowest method possible)
and it doesn't operate with any pattern matching or wildcard support (at
least when used on its own). Compared with memory resident proxies etc.
which have rather "smarter" methods of identifying and blocking junk,
hosts is a very inefficient option. It was never designed to contain
massive numbers of "blocked" sites, but rather provide a list of
(relatively few) numerical IP addresses corresponding to IP host names,
thereby avoiding DNS lookup and, in theory, speeding things up. If you
look at the file hosts.sam, it will give you some idea of its intended
usage.
 
My point about the hosts file remains though. Unless the fundamental
mechanism used to access the hosts file has changed in more recent
Windows versions, it represents a most inefficient way of redirecting
domains to localhost. Some fairly extensive testing I was involved in
(comparing hosts performance against a junk filtering local proxy)
showed that hosts loads into memory from disk, *every time* it is
accessed. It can't possibly take "the same time" with or without the
hosts file, even though you may perceive it as such. Naturally, overall
browsing may well (and should) show a noticable improvement, with less
junk being downloaded. But this is apples & oranges, since now we're
comparing local I/O disk reads with internet downloading.

In addition, hosts is searched sequentially (slowest method possible)
and it doesn't operate with any pattern matching or wildcard support (at
least when used on its own). Compared with memory resident proxies etc.
which have rather "smarter" methods of identifying and blocking junk,
hosts is a very inefficient option. It was never designed to contain
massive numbers of "blocked" sites, but rather provide a list of
(relatively few) numerical IP addresses corresponding to IP host names,
thereby avoiding DNS lookup and, in theory, speeding things up. If you
look at the file hosts.sam, it will give you some idea of its intended
usage.

Well all this is true, though in practice I don't notice any difference
in surfing speed. But I suppose it varies from system to sytem.





Aaron
 
On Wed, 17 Sep 2003 22:22:36 -0400 "Jason de Bougainville"

:>There is a better way of blocking any domain from Internet Explorer.
:>Go to "Tools > Internet Options > Privacy > Edit". All you have to do
:>is enter the domain name, i.e. "doubleclick.net", and it will block
:>everything coming from that domain no matter what appears before
:>"doubleclick" or after ".net".
:>You can also setup heavy duty cookie handling from the Privacy page.
:>I'm using IE6SP1 but I think IE5 had that ability also. If your
:>version doesn't have it just download the current version.

That seems to just block cookies.

Right. http://pgl.yoyo.org/adservers/#iexml shows you how to import a
list of them.

I have found that Content|Content Advisor|Approved sites does a good
job of blocking the domain.

Anyone figured out what format to allow importing?


Aaron
 
Lee said:
Anyone have or know of any good utilities to enable / disable the HOSTS file
for ad removement, also anyone know of a good resource for updating the
ads/spyware in the HOSTS file?

Why don't use use Mozilla or Mozilla Firebird for a browser? You right click on
an ad and check "Block images from this server" and the ads are gone.
www.mozilla.org
 
Why don't use use Mozilla or Mozilla Firebird for a browser? You right
click on an ad and check "Block images from this server" and the ads
are gone. www.mozilla.org

They still load up though. Just not displayed, so slow downs your
surfing. Hosts stop them cold.



Aaron
 
To just answer your questions:

You can use a simple batch file to rename the HOSTS file "on-the-fly".
Download: RenHosts.bat [right-click and select: Save Target As]

Place RenHosts.bat in your Windows folder
Create a Desktop or Quick Launch shortcut to RenHosts.bat
"A RenHosts.bat.pif was created which I added to my 'launcher'".
Note: if IE is open when you toggle the HOSTS file, click Refresh (F5)

To use: click (the shortcut) once to rename HOSTS to NOHOSTS
Click again to rename NOHOSTS back to HOSTS
Note: you will see a small on-screen message as to the status.

http://www.mvps.org/winhelp2002/RenHosts.bat
A hosts file is available on the same site.

HostToggle is an alternative also, but gives 'some' users problems,
which I've not seen mentioned when using RenHosts.bat.

A much larger host that includes the info from the hosts file above
is at: http://www.accs-net.com/hosts/
The site explains the 'extra' contents of this larger hosts file.
I started with the smaller hosts file last year and switched to
the larger hosts file several months ago. Since my browser is FireBird,
I never see ads when using either hosts file. When used the first
time, I've read that hosts loads into memory, so neither ever caused a
slow down on my system. Your mileage may vary. :-)

BoB
For the duration of Swen, my address is inoperative.
 
Back
Top