0

Possible Duplicate:
How to clear browsers (IE, Firefox, Opera, Chrome) history using JavaScript or Java except from browser itself?

Is there any code to clear all browser history , cookies and cache memory from major browser like Mozilla, Safari and chrome in C#. Net Windows Application ??

I just want to make a tool where any one can delete those things rather than manually delete .

How can i do that ?

Thank You

Community
  • 1
  • 1
  • This isn't done easily and has been asked various times before. For example here: [How to clear browsers (IE, Firefox, Opera, Chrome) history using JavaScript or Java except from browser itself?](http://stackoverflow.com/questions/2190808/how-to-clear-browsers-ie-firefox-opera-chrome-history-using-javascript-or-j) – CodeCaster Sep 27 '12 at 10:53
  • You could use C# to silently install CCleaner and [then run it with various command line parameters](http://www.piriform.com/docs/ccleaner/advanced-usage/command-line-parameters) from your application – JMK Sep 27 '12 at 10:53
  • This is not a duplicate of linked question. The linked question is about doing same thing using web programming(in client machine). This question talk about a method using windows programming. – Falaque Apr 23 '15 at 05:22

2 Answers2

0

Find out where those browsers save those files, then use the File or Directory types from the System.IO namespace to delete\nullify them. e.g. Firefox saves them in:

%APPDATA%\Mozilla\Firefox\Profiles
Saeb Amini
  • 23,054
  • 9
  • 78
  • 76
  • Firefox has so many versions , then can You ensure me that every version stores their cookies or History files in above location ? – Animesh Datta Sep 27 '12 at 11:31
0

You can not do it either in .net or in javascript.Each browser saves its browser history in a different way and at a different location.And browsers store their history in their own files.

urz shah
  • 471
  • 2
  • 8
  • 18