How to block cookies on Firefox?

Discussion in 'Linux Compatibility and Software' started by Kyle, May 13, 2019.

  1. Kyle

    Kyle JVC SZ2000 Dual-Driver Headphones

    Reputations:
    1,740
    Messages:
    926
    Likes Received:
    434
    Trophy Points:
    76
    I want to block cookies from certain websites.
    I look at set cookies, and then put it in the "manage exceptions" list and set them to block.

    For instance, if in my stored cookies like, I see facebook.com.
    Then, when I put in in my blocked list, should I put facebook.com or www.facebook.com?
    Is there a rule to put in wildcards? *.facebook.com?
     
    hmscott likes this.
  2. ratinox

    ratinox Notebook Deity

    Reputations:
    119
    Messages:
    1,047
    Likes Received:
    516
    Trophy Points:
    131
    Rather than blocking cookies by hand I suggest using Privacy Badger. It watches sites' access to the cookie store and blocks content (cookies, images, etc.) which appear to be tracking you without your consent.

    I also suggest looking at Firefox Multi-Account Containers. This add-on sandboxes specified web sites which is a fancy way of saying that if you have Facebook in the Facebook container it cannot see or touch anything in your Google Mail container and vice-versa.
     
    hmscott and Kyle like this.
  3. Kyle

    Kyle JVC SZ2000 Dual-Driver Headphones

    Reputations:
    1,740
    Messages:
    926
    Likes Received:
    434
    Trophy Points:
    76
    Thanks. Both of them seem useful addons.

    For Facebook, twitter: I do not go on those sites, but still cookies from them appear in my stored cookies.
     
    hmscott likes this.
  4. wiggs

    wiggs Notebook Enthusiast

    Reputations:
    10
    Messages:
    15
    Likes Received:
    4
    Trophy Points:
    6
    Check these settings:
    Code:
    network.cookie.thirdparty.sessionOnly
    network.cookie.lifetimePolicy
    network.cookie.cookieBehavior
    network.cookie.same-site.enabled
    
    Also, consider setting
    Code:
    privacy.clearOnShutdown.cookies
    to true.

    Some of the above can be set from
    Code:
    about:preferences#privacy
    , others require about:config or editing mozilla.cfg.

    One of the easiest ways to selectively "block" (notice the quotation marks) selected domains is to install local DNS server that will use custom blocklist and return NXDOMAIN to all undesirable queries.

    Let me know if some clarification is needed.
     
    Kyle likes this.
  5. ratinox

    ratinox Notebook Deity

    Reputations:
    119
    Messages:
    1,047
    Likes Received:
    516
    Trophy Points:
    131
    Right, because third party sites use Facebook and Twitter for user authentication and trackers use them for user tracking. Privacy Badger looks at these cookies and determines if they are being used for tracking. If they are then the add-on blocks their use. That is, if a Facebook cookie-using tracker tries to use the Facebook cookies to track you then Privacy Badger blocks that access and your browser becomes invisible to that tracker.

    It's a lot easier and more reliable than trying to hand-manage cookies.

    If you choose to dive down this hole then I can reccomend Pi-Hole although this does require a dedicated machine or VM if you're on Windows (Pi-Hole does not yet run properly under WSL). Pi-Hole can be run directly on Linux machines. No experience trying to run it on MacOS or other UNIXen.
     
    Kyle and hmscott like this.
  6. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    7,126
    Messages:
    10,313
    Likes Received:
    7,582
    Trophy Points:
    931
    Aroc, Kyle and hmscott like this.
  7. Kyle

    Kyle JVC SZ2000 Dual-Driver Headphones

    Reputations:
    1,740
    Messages:
    926
    Likes Received:
    434
    Trophy Points:
    76
    Aroc, Vasudev and hmscott like this.
  8. ratinox

    ratinox Notebook Deity

    Reputations:
    119
    Messages:
    1,047
    Likes Received:
    516
    Trophy Points:
    131
    hmscott, Vasudev and Aroc like this.
  9. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    7,126
    Messages:
    10,313
    Likes Received:
    7,582
    Trophy Points:
    931
    It was working beautifully and after 64.x it always warns certain site gets blocked, so I custom with basic protection. So website breaking occurred ever since. Be it banking or Paypal or Gpay.
     
    hmscott likes this.
  10. ratinox

    ratinox Notebook Deity

    Reputations:
    119
    Messages:
    1,047
    Likes Received:
    516
    Trophy Points:
    131
    I don't use Google Pay but I've had no problems with either banking or PayPal letting Privacy Badger do its thing.
     
    hmscott and Vasudev like this.
Loading...

Share This Page