且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

清除WebBrowser控件的浏览历史记录

更新时间:2023-09-18 17:20:34

实际上,有两种历史记录。一个是访问的页面列表,另一个是您在IE的历史记录用户界面中看到的实际历史记录。

Actually, there are two types of history. One is "Visited" pages list, and the other is the actual history you see in IE's history user interface.

如果要删除访问的页面列表,则需要使用DeleteUrlCacheEntry删除每个项目。通过使用FindFirst / NextUrlCacheEntry API进行遍历,您可以访问创建这些项目的时间和日期,因此只能删除在浏览器会话开始之后和结束之前创建的项目。

If you want to remove the visited pages list, you need to use DeleteUrlCacheEntry to delete each item. By looping through using FindFirst/NextUrlCacheEntry API's you can get access to the time and date these items were creates, and therefore only delete the items created after your browser session started and before it was finished.

对于FindFirst / NextUrlCacheEntry和DeleteUrlCacheEntry信息,您可以使用在线预写的代码,然后轻松创建过滤器来确定要循环浏览的项目。缓存条目。

For FindFirst/NextUrlCacheEntry and DeleteUrlCacheEntry information, there are pre-written codes online that you can use, and then it will be easy for you to create a filter to decide which items you want deleted when you are looping through these cache entries.

让我知道是否可以提供进一步的帮助。

Let me know if I can be of further assistance.