How to block a link from your browser?



  • Say you are developing a firefox plugin. I want to block all links that start with www.google.com/
    How are people doing this? Whitelists and Blacklists, how does the browser work?



  • It's generally not done at the browser level. This is because it would be too easy to just switch browsers to get around such a restriction. Depending on your setup, you can:

    • Install software on your system that will filter requests locally and allow you to build a whitelist/blacklist. Many such programs can be configured to apply such rules only to certain users, or allow you through after entering a password.
    • If you have your own DNC, you should be able to build a whitelist/blacklist there.
    • Many routers and modems these days have features that allow you to define a blacklist.


  • I think I know how to do this at OS level, by changing some host file on the machine. Yes router level is also within my grasp.

    How are these plugins able to do it at a page level is above my level of understanding...


Log in to reply