There is good information on how to do this here. The summary is that you configure your browser to only allow cookies from sites you choose to allow. Here is the firefox section from the link
- Click on Tools > Options > Privacy tab
- Uncheck the box next to "Accept Cookies From Sites". Then click on the Exceptions button.
- In the text box at the top where it says "Address Of The Website" type in the sites where you have log in accounts. You can save
yourself some typing in Firefox because the WWWs are the default.
Instead of typing "www.google.com" all you need to type is
"google.com". Some sites will require you to type in a subdomain like
"support.mozilla.com".
- Click on the "Allow" button to allow that site to save their cookies on your hard drive.
- Keep repeating steps 3 and 4 until you have all of your log in sites in there.
- When you are finished click on the Close button. DO NOT X OUT OR YOUR WORK WILL NOT BE SAVED!
edit: if you don't see these options but do see
Firefox will: Remember history change
change it to
Firefox will: Use custom settings for history
Additionally if you want to stop social networks from tracking your activity you can use the priv3 firefox extension.