locked
clearing webbrowser cookies RRS feed

  • Question

  • Hi,
    I read somewhere that finally in mango there will be a way to clear cookies in a webbrowser control.

    I installed the SDK today and I'm trying to do this, but I don't understand how to achieve this goal.
    The only method I found is "GetCookies()" which seems pretty useless to me.
     
    Any tip on this?

    Thanks,
    Marco
    Saturday, October 1, 2011 6:05 PM

All replies

  • Ok, before getting any answer, I realized that the problem is worse than what I thought.

    I noticed that, restarting the application, the cookies are stored somewhere (in the isolated storage I suppose) and are not related to the webbrowser control.

    So, what I think I need is a way to clear cookies from the isolated storage... But I don't have any idea how they are stored.
    Of course, I cannot wipe the IsolatedStorage because there are other data I cannot delete.

    Could anyone help me?

    Thanks,
    Marco
    Saturday, October 1, 2011 6:13 PM
  • I read somewhere that finally in mango there will be a way to clear cookies in a webbrowser control.
    Where did you read this?
    Saturday, October 1, 2011 6:17 PM
  • Where did you read this?

    Is it so important? Let's focus on the solution, please :)

    Marco
    Saturday, October 1, 2011 10:49 PM
  • Yes, it is important actually, as there might not even be a solution and this thread is a waste. If the site was just talking about rumors we can confirm or deny them.
    Saturday, October 1, 2011 11:34 PM
  • This thread is not talking about a website which may have said that in mango will be possible to clear cookies (I don't remember how exactly the thing was written).
    This thread is about ME, who needs a way to clear cookies and doesn't find a way to do that.

    If you consinder this thread a waste it's probably because of your waste-replies.

    Now, can we please focus on the real topic of this thread?
    (clearing cookies stored on the isolated storage, or something equivalent in order to start a webbrowser control that don't find any cookie)

    Thanks,
    Marco
    Sunday, October 2, 2011 12:20 PM
  • Hi Marco,

    No APIs are exposed that would enable you to delete cookies by accessing persistent storage.

    I cannot find, and am not aware, of an ability to delete WebBrowser control cookies.

    Feel free to post a feature request here (and an explanation as to why it is required).

    Something else to consider is that if a cookie is tagged with the HttpOnly flag, this is supposed to be an indication from the server that the cookie is intentionally not accessible via client side script; the capability is disabled to accommodate policy. This can affect your design decision particularly if you do not have control over the server side web page content.

    Thanks!
    Mark
    Monday, October 3, 2011 9:15 PM
  • I cannot find, and am not aware, of an ability to delete WebBrowser control cookies.
    Which is the usual case with not allowing apps to modify user settings that aren't app related. I can't figure out why people don't understand that this isn't Android or iPhone. :\ The reason why MS doesn't allow this type of functionality should be obvious
    Monday, October 3, 2011 10:35 PM
  • Excellent point, Jim.
    - Mark
    Tuesday, October 4, 2011 6:40 PM
  • I cannot find, and am not aware, of an ability to delete WebBrowser control cookies.

    For instance, for logging out from facebook.
    I cannot develop a multi-user facebook application because I don't have a way to clear personal cookies.

    Applications could do more of what you're able to imagine...
    Probably you weren't able to imagine an ability to have direct access to the camera with the first release of the OS...

    Which is the usual case with not allowing apps to modify user settings that aren't app related. I can't figure out why people don't understand that this isn't Android or iPhone. :\ The reason why MS doesn't allow this type of functionality should be obvious

    Could you please explain why deleting cookies could became a security issue?
    For me it's obvious it cannot.

    Marco
    Wednesday, October 5, 2011 4:02 PM
  • Which is the usual case with not allowing apps to modify user settings that aren't app related.

    Also, maybe you didn't notice that cookies are per-applications and not globals.
    If you were talking about global cookies I would agree... but since cookies are stored (and isolated) per-application, inside the application isolated storage, they are app related.

    Marco
    Wednesday, October 5, 2011 5:44 PM
  • I cannot develop a multi-user facebook application ...
    On Windows Phone 7?!?

    Why is it that people expect the platform to work a certain way so they can build apps that don't make sense for that platform instead of just building apps that make sense for the platform? :\
    Wednesday, October 5, 2011 6:06 PM
  • I noticed you don't have any technical point anymore and you switched to philosophy...
    Anyway, what platform are you talking about? Windows phone or any mobile device?

    If windows phone, then you could be right... the platform is limited and doesn't meet all the people needs.
    I'm trying to satisfy people requests but probably I'm trying to do more than the device could offer. I'll forward my users to android or iphone when they send me feedbacks.

    If you're talking about any mobile device, it's not you that could decide what makes sense in a plaform or not, but it's all the people. The market, if you prefer.
    You (read: microsoft) could try to guess what a mobile device is, but when people want something you cannot create on it, you failed.

    But the result of both are the same:
    iPhone user: hey buddy, look at this great app!
    WP user: why there are not apps like that in my phone??
    <a year later>
    WP user buy a new iPhone because wants more apps, some of them not available on windows phone.

    Marco
    Thursday, October 6, 2011 5:09 PM
  • Anyway, what platform are you talking about?

    Umm, that would be WP7 of course. That's the subject of these forums. :\

    But the result of both are the same:
    iPhone user: hey buddy, look at this great app!
    WP user: why there are not apps like that in my phone??
    <a year later>
    WP user buy a new iPhone because wants more apps, some of them not available on windows phone.
    And I have no problem with this. If a platform doesn't offer you the functionality you want, don't use it. It's very simple.

    Are we finished now?
    Thursday, October 6, 2011 5:27 PM
  • Even if no one explained me why "clearing application cookies" is not available... yes, I think we finished.
    But if there is any non-arrogant developer in wp team that realize this feature is not only safe but also useful, I'll appreciate it.

    Marco
    Thursday, October 6, 2011 7:01 PM
  • You do realize I'm a developer just like you, right? :)

    It has nothing to do with being safe, it's about the user managing what happens on the device, not developers. As far as it's usefulness, it might be useful to you for your application, but from a platform standpoint (which is all that matters) it has the potential to be abused and thus isn't something that's really that useful.

    In any case, feel free to suggest it in the appropriate place.
    Thursday, October 6, 2011 7:11 PM
  • Hi Marco, I came across a discussion thread that seemed to address your question. I have not been able to make it work for what I was trying to do but it does seem geared towards dealing with Facebook login. You might give it a try (if you still need this).

    http://stackoverflow.com/questions/3397123/windows-phone-7-clear-cookies

    Cheers.

    Thursday, September 13, 2012 5:37 PM
  • Man, reading the replies here I really wish there was a way to block posts from users like you so I never ever have to see them. you're not a developer like Marco because you don't understand something very basic. Not being able to delete cookies meant you can't use any single sign on solution like Azure ACS on the phone.

    Not only do you not understand the platform, you can't see anything other then your own way of doing something. If you're an MS MVP, that program is really meaningless.

    Of course, it's not as bad as Mark taking your side and saying it's not needed because it ain't Android or iPhone so developers shouldn't be able to use SSO and sign users out. 

    Monday, December 3, 2012 7:23 AM