Another issue with this design is that Adblock extensions hide the blocked elements, using the hosts file leaves loads of 404's all over websites and it looks rather ugly.
Way back when, I wrote a simple web server that ran on localhost that served empty files for any .html, .js, etc. request and 1x1 pixel images for any .gif, .jpg, etc. request.
It worked pretty good. As a poster upthread noted, though, the big issue with this approach is maintaining the list.
It worked pretty good. As a poster upthread noted, though, the big issue with this approach is maintaining the list.