Newsgroups : Microsoft : microsoft.public.inetsdk.programming.wininet : 2004 Dec : InternetOpenUrl reads from cache

www.cryer.info
Managed Newsgroup Archive

InternetOpenUrl reads from cache

Subject:InternetOpenUrl reads from cache
Posted by:"Joby Larsen" (joby.lars..@notmail.com)
Date:Sat, 4 Dec 2004 18:00:56

My program needs to read a web page that gets updated every minute or so.
After reading the file the first time, it just goes back to the cache on
subsequent reads. My copy never gets updated. The only way I can force the
program to go to the web is to use IE to delete the local cache.

The function call I am using
hSource = ::InternetOpenUrl(mhInternet,Source,NULL,0,INTERNET_FLAG_RELOAD |
INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_PRAGMA_NOCACHE,(DWORD_PTR)&Token);

The program will read the updates of another similar site correctly, but not
this one. Is there anything I can do to force the function to ignore the
cache? Is there something I don't know about?

I suppose I could call DeleteUrlCacheEntry(), but it all seems rather silly
when it shouldn't be caching anything to start with, and even if it did,
should be ignoring the cache and reloading the page.

Replies:

www.cryer.info
Managed Newsgroup Archive