If a browser has been used to visit a few sites and has active logins and then the user turns on private browsing, can the sites still access data such as cookies and cached files that were created before private browsing was turned on? For example in Opera's Private Browsing help page it says that no trace of the websites you visit in Private Browsing mode are left after closing the browser but does that mean websites can still collect data on you if the either have access to a cookie or associate data with your IP? If this can happen is there anyway to make things more secure and private?
Normally cookies are not shared with a normal browser session. When you start a private browsing session, no cookies will be present. If you close your private browsing session all of your cookies will be deleted.
In regard to your IP: considering this will be shared there is a chance of course that the server will be able to see that two sessions have originated from the same IP. Furthermore there are actually more ways to fingerprint a browser (for instance query versions of Java, PDF reader, installed plugins,...) which could compromise your anonymity .
I can’t offer a guaranteed generality, but I tried the following experiment in Internet Explorer 8:
My result was that the site didn’t recognize me and asked me to login. This suggests to me that a site visited by IE8 using “InPrivate” mode does not have access to cookies it stored on your machine previously.
Of course I agree with Lucas in that any site that chooses to use its storage resources this way can keep a server-side data store of user information, keyed by IP address.