I want to create a c++ application that works together with a website. In order to keep the application synchronized with the website I want to be able to read some cookies from the user’s default browser. Is there any way to do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not in the general sense – there’s no real defined format for cookie storage, so each browser is free to keep the cookie database wherever, and in whatever style, it prefers.
You could implement cookie reading functions for the mainstream browsers (IE, Firefox), but that would leave some people out. It would also be non-robust – what happens when the user clears their cookie cache, or uses more than one browser?
If you want to keep your application synchronised with a website, I’d recommend that you have it call directly into web services (RESTful, etc) on that site, with a username/identifier your application users configure. This way, you’re not tied to an arbitrary 3rd party that is, at best, only “maybe” right.