How to clear the MSIE / WinInet cache programmatically?

I am trying to clear the WinInet cache using the Win32 API - by invalidating the cache entries or deleting them (it doesn't matter). I can’t find a way to do this for the entire cache (except repeating each entry - an example in C # , another in VB ) - is this possible?

+3
source share
4 answers

I'm pretty sure that I am running FindFirst / FindNextUrlCacheEntry (), then DeleteUrlCacheEntry () is the only way to make sure that it works in all versions of IE.

Alternatively, you can use FindFirst / FindNextUrlCacheGroup () and DeleteUrlCacheGroup () with "CACHEGROUP_FLAG_FLUSHURL_ONDELETE", but you must make sure that you delete only what you want. For example, history, cookies, and temporary Internet files are all cache groups.

+2
source

Apparently, you can (ab) use the Internet Options panel to clear cache files by doing the following:

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8 

Try to call it a DLL.

Source: http://www.vbforums.com/archive/index.php/t-440508.html , comment by technorobbo

+4
source

FTR: (. , , cookie ..). http://www.howtogeek.com/howto/windows/clear-ie7-browsing-history-from-the-command-line.

BTW: , RunDll32 , , , -. - , , " ", ? C ( Java, JNI) - , ?; (

PS: stackoverflow?

0

Do not use the method: RunDll32.exe InetCpl.cpl, ClearMyTracksByProcess 8 This is not supported by Microsoft and it has been shown to break the cache and cause all kinds of unusual problems.

0
source

Source: https://habr.com/ru/post/1707692/


All Articles