A Hosts file works with any app that accesses the internet, not only browsers.
What I also suggest is to make HOSTS file Read-only!
BTW:
127.0.0.1 insider.msg.yahoo.com
127.0.0.1 ads.yldmgrimg.net
127.0.0.1 ds.serving-sys.com
127.0.0.1 ad.yieldmanager.com
127.0.0.1 clicks.beap.bc.yahoo.com
127.0.0.1 bs.serving-sys.com
127.0.0.1 ad.yieldmanager.com
These will KILL ALL YAHOO ads
To block pre-roll ads on Youtube you add these lines:
127.0.0.1 ads.youtube.com
127.0.0.1 s0.2mdn.net
127.0.0.1 s1.2mdn.net
127.0.0.1 googleads.g.doubleclick.net
127.0.0.1 pubads.g.doubleclick.net
127.0.0.1 ad.doubleclick.net
127.0.0.1 static.doubleclick.net
Bookmarks