Results 1 to 3 of 3

Thread: Clearing Internet Cookies In C#

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    121

    Clearing Internet Cookies In C#

    Can someone help me with some code to clear iExplore cookies? Its alot more difficult then it seems.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    121

    Re: Clearing Internet Cookies In C#

    anyone?

  3. #3
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: Clearing Internet Cookies In C#

    An easy way would be to use Environment.SpecialFolder enumeration to get the Cookies folder and then Delete all the files inside the folder
    Code:
    	public void deleteCookies()
    	{			
    		DirectoryInfo di = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.Cookies));
    		foreach (FileInfo fl in di.GetFiles())
    			fl.Delete();		
    	}
    Don't forget to include System.IO namespace.
    Last edited by Shuja Ali; Mar 25th, 2006 at 07:29 AM.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width