1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

c# Webbrowser Can't delete Cookies/Cache

Discussion in 'C, C++, C#' started by fluxo27, May 29, 2014.

  1. fluxo27

    fluxo27 Junior Member

    Joined:
    Apr 27, 2013
    Messages:
    169
    Likes Received:
    22
    Hello,

    before I reinstalled the the system on my computer, when I used CCleaner oder Manually deleted the Cookies from my Internet Explorer,
    the cookies from the webbrowser in my c# application were deleted too. My Application was also using an Adblock.

    But now, the c# webbrowser keeps its cookies and cache and also doesn't use adblock, can anyone tell me how to fix this? :(
     
  2. Recharge

    Recharge Newbie

    Joined:
    Jun 6, 2014
    Messages:
    3
    Likes Received:
    1
    Occupation:
    PHP/JS/C# Developer
    Location:
    Crypto-land.
    Your web browser in C# is inherited from Windows Internet Explorer, therefore any changes made to IE will affect your browser as well. :)
     
  3. waass

    waass Registered Member

    Joined:
    Jul 30, 2011
    Messages:
    59
    Likes Received:
    16
    You should use IE api for this you can call api from your c# application and you will be able to clear your cookies and cache
     
  4. FJX

    FJX Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 13, 2011
    Messages:
    356
    Likes Received:
    186
    Location:
    0x90
    Use selenium if you're really into emulating browsers.
     
  5. vebxperts

    vebxperts Jr. VIP Jr. VIP Premium Member

    Joined:
    Nov 15, 2008
    Messages:
    1,657
    Likes Received:
    339
    Use GeckoFx + Xulrunner and you won't regret this choice.
    Firefox uses this engine and I'm sure you know how good firefox is.

    Latest is version 29 (Just for your info)
     
  6. Nitros

    Nitros Power Member

    Joined:
    Jan 30, 2009
    Messages:
    573
    Likes Received:
    295
    You can delete cookies in C# by setting their expiration date to 1 day before.

    Example:
     
  7. MisterNick

    MisterNick Registered Member

    Joined:
    Oct 22, 2014
    Messages:
    54
    Likes Received:
    45
    Occupation:
    Programmer
    Location:
    Tbilisi,Georgia
    You can update IE to latest version 11.0(or far) and then use some RegKey function in your application to make navigations as IE11 and not as IE7. If you need some help with it PM me your skype,email or something and i will gladly help you.
    Thanks