Everytime I Clear Private Data (Tools Property) in FireFox; websites keep logging me out.
How can I avoid this?
When you choose to clear all your private data, it will of course wipe out any cookies you had for StackOverflow.com and any other site.
The only way to avoid this is to manually clear your private data. In FF 3.5 you can choose Tools -> Privacy -> Clear Recent History -> Details and check off the items you want to remove, leaving your active logins.
Then you'd have to manually clear your cookies the same way.
Here's a short explanation:
HTTP - the communications protocol used for the World Wide Web is stateless. That means that you make a request, and get a response, and your next request knows nothing about your previous request. To overcome this limitation, most web applications use "cookies". Cookies are small pieces of data that the server (stackoverflow.com) tells the web browser (Internet Explorer or Firefox) to remember. As long as the cookie exists and is valid (cookies have a timeout), the browser is obligated to send the cookie with any request to the server.
So, the web server sends your browser a cookie with which to track your session, and your browser sends that cookie to the server with each request, identifying the request as part of your session.
When you clear private data (particularly, when you clear cookies) you delete the session cookie. The next time you connect to the server, your browser has no session information to send, and the server assumes you're in a new session. Since you haven't logged in to this new session, the server gives you an anonymous, non-logged in session, and provides you with a non-logged-in page. You then have to log in to get the new session.
So, if you don't want to lose your session, you either have to find some way to back up the Stack Overflow cookie (I don't know how you'd do this, off the top of my head), delete only the other cookies (again, I don't know how you'd do this one) or you have to not delete any cookies.
Or you can just accept that when you delete private data, you'll lose your session.
Keeps all your "normal" passwords, history, etc. intact.