Click here to Skip to main content
16,018,006 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone.....


I need to clear all browsing history from Windows desktop application?
how it would be possible? give brief code of that application.

Thanking You
Posted

Try this thread:
Get Web browser history in C#[^]
Found it here[^]
 
Share this answer
 
Loop through the below folders and delete each file.

C#
string _tempInetFile = Environment.GetFolderPath(Environment.SpecialFolder.InternetCache);
string _cookies = Environment.GetFolderPath(Environment.SpecialFolder.Cookies);
string _history = Environment.GetFolderPath(Environment.SpecialFolder.History);

List<string> folderPathList = new List<string> { _tempInetFile, _cookies, _history };

foreach(string dirpath in folderPathList)
try
{
Directory.Delete(dirpath, true);
}
catch{}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900