How can I clear MS Edge History and Saved Passwords programmatically using C# .Net ?

Akshit Jain 1 Reputation point
2021-10-26T15:36:45.507+00:00

I tried using the following path for clearing cache, history, cookies in MS Edge browser :

%LOCALAPPDATA%\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\

But it wasn't a success for me.
Can anyone suggest another approach

Microsoft Edge | Microsoft Edge development
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
{count} votes

2 answers

Sort by: Most helpful
  1. Castorix31 91,536 Reputation points
    2021-10-26T15:56:24.887+00:00

    I checked the History database from Location of Microsoft Edge history and it contains the data on my version (94.0.992.50 )
    As it is a SQLite database, I opened it with SQLite and SQL Server Compact Toolbox
    to check that urls or other data were right

    0 comments No comments

  2. Anonymous
    2021-10-27T05:42:28.3+00:00

    Hi @AkshitJain-1520

    Do you want to delete cache, history and cookie files of Edge Chromium browser? If so, the location you use is wrong. That's the location for Edge Legacy browser.

    The locations for cache, history and cookie files of Edge Chromium are below:
    directory: C:\Users%username%\AppData\Local\Microsoft\Edge\User Data\Default\Cache
    file: C:\Users%username%\AppData\Local\Microsoft\Edge\User Data\Default\History
    file: C:\Users%username%\AppData\Local\Microsoft\Edge\User Data\Default\Cookies


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Regards,
    Yu Zhou


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.