We’ve reached a point where real security and privacy are harder and harder to come by. If your PC or laptop is connected to a network and you use a web browser, unless you are diligent, you will eventually find yourself in a compromised situation. Even if you don’t wind up with ransomware or malware on your system, you’ll end up with a plethora of cookies saved on your machine, the purpose of which is to track and store your data.

SEE: Password breach: Why pop culture and passwords dont mix (free PDF) (TechRepublic)

In a perfect world, that would be fine. But we don’t live in a perfect world, and allowing a web browser to collect that data can feel like a breach of privacy and a possible threat to your security.

What do you do?

One option is to completely block all site cookies in your web browser. If your browser of choice is Firefox (as is mine), you are in luck, as there is a way to make sure you block all site cookies.

The required warning

The most important warning you’ll need is that by blocking all site cookies, you will find some sites refuse to function properly. That’s inevitable. When you find that to be the case, it’s OK to back off control over the sites you absolutely trust (such as those you must use for work). For questionable sites, think twice about relinquishing control.

Another warning is that you can always opt to go the Private (or Incognito) route with your browser for sites that can function with cookies disabled and use a standard instance for those sites that do not function properly. However, the more efficient method is to block all site cookies and then make exceptions.

Let me show you how.

How to block all site cookies

The first thing we do is block all site cookies. To do this, click the menu button in the upper right corner of the browser window. From the menu, select Settings. In the resulting window, click Privacy & Security and then click Custom (Figure A).

Figure A

The Privacy & Security section in the Settings window of Firefox contains a number of important features.

In the Custom section, make sure to click the check box for Cookies and then, from the drop-down, select All Cookies (Figure B).

Figure B

Blocking all cookies in Firefox is but a drop-down away.

The customization is automatically saved, so all cookies will now be blocked in Firefox. If you have tabs open, you’ll need to reload them.

How to make exceptions

At this point, sites are going to break. When you run into an instance where a required site doesn’t function as needed, you must create an exception for that site. To do that, go back to the Privacy & Security section in the Settings window. In the Cookies and Site Data section (Figure C), click Manage Exceptions.

Figure C

Here’s where you can make an exception for a site to be allowed to save cookies.

In the next window (Figure D), type the domain you wish to exempt from the No Cookies setting and click Allow.

Figure D

Exempting techrepublic.com from the No Cookies rule.

Click Save Changes and the domain will now be able to save cookies to local storage. That, however, may not be enough. Close the settings window and visit the site in question. Once the site loads, click the shield in the address bar and then click All Cookies (Figure E).

Figure E

The protections listing for techrepublic.com.

In the resulting popup (Figure F), you’ll see all of the domains that were blocked from saving cookies to your local storage. If, after adding an exception for the domain of the site, you find the site still doesn’t function properly, you’ll probably need to add exceptions for some of the other domains attempting to save cookies.

Figure F

All of the domains attempting to save cookies when visiting techrepublic.com.

Unfortunately, you cannot simply add one of those sites from the popup menu. Instead, you must go back to the Exception Management tool and add them manually. This can get a bit frustrating, as there’s a bit of guesswork involved with getting the right combination of third-party domains correct to ensure the site performs correctly.

Once you do find the site is performing as expected, you’re good to go. You’ll then have to run through this same task with all sites that misbehave. But if you’re really concerned about your privacy and security, blocking all cookies might be the way to go. Yes, it’s more work, but the end result will be considerably more private and secure.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays