Article ID: 262110 - Last Review: March 29, 2007 - Revision: 3.1 How To Clear Cache When Your Application Hosts a WebBrowser Control
This article was previously published under Q262110 SUMMARY When your application hosts a WebBrowser control, there may
be a need to clear the cache programmatically. This feature is not available
through the interfaces of the WebBrowser control. This article explains how to
use WinInet API functions to clear the cache directly. MORE INFORMATION Use WinInet API FindFirstURLCacheEntry to find the first
cache entry and use FindNextUrlCacheEntry to enumerate through the cache. Use
DeleteUrlCacheEntry to delete each entry. Note that FindFirstUrlCacheGroup, FindNextUrlCacheGroup, and DeleteUrlCacheGroup are used in the following example. These API functions have only became available with Internet Explorer 5, so proper checking as shown is needed to prevent errors. The following steps show you how to use the WinInet API in Visual Basic to clear all the files in the cache.
REFERENCES For more information about the syntax of the WinInet
caching function, see the following Microsoft MSDN Online Web Workshop site: Persistent URL Cache Functions
(http://msdn2.microsoft.com/en-us/library/ms903369.aspx)
For more
information about developing Web-based solutions for Microsoft Internet
Explorer, visit the following Microsoft Web sites:http://msdn.microsoft.com/ie/
(http://msdn.microsoft.com/ie/)
http://support.microsoft.com/iep (http://support.microsoft.com/iep) APPLIES TO
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email

Back to the top
