2 ms·
The problem with the hosts file is that some sites have onclick-handlers in their download-buttons etc. that first call out to google analytics etc. to register
by atesti 9y ago
The problem with the hosts file is that some sites have onclick-handlers in their download-buttons etc. that first call out to google analytics etc. to register the event before allowing it. Blocking on the host level makes these sites fail and temporarily disabling hosts is cumbersome.
Ghostery has a nice little library of stubs for e.g. ga that are injected in each page. I think any good solution will need to have such shims. Doing it on the network level (like redirecting to a stub hosting webserver) has problems with SSL