Newsgroups : Microsoft : microsoft.public.inetsdk.programming.wininet : 2008 Mar : InternetOpenUrl and local cache

www.cryer.info
Managed Newsgroup Archive

InternetOpenUrl and local cache

Subject:InternetOpenUrl and local cache
Posted by:"Si" (blueturt..@walla.co.il)
Date:Tue, 4 Mar 2008 08:12:05 -0800 (PST)

Hi,

I'm using InternetOpenUrl, with the flags INTERNET_FLAG_RESYNCHRONIZE
| INTERNET_FLAG_NO_UI, to access a file on a web server.
In the web server, the file is defined to expire after 2 days.

I see 2 behaviors that I don't understand, and I hope someone can
help.

__Issue 1__

After the 1st download, the file is stored in the temporary files
folder.
If I try to "InternetOpenUrl" during the 2 days before expiration,
I've expected that there will not be an access to the web server,
However I see (using Fiddler), that there is an access to the web
server with result 304.
Is there a way to avoid this access before expiration, so only local
cache is used ?


__ Issue 2__
In the previous scenario, although I see "304" in Fiddler,
HttpQueryInfo returns "200".
How can I get the real value ?
(Maybe this issue will be resolved after the 1st one is)

Thanks for any help,
Si.

Replies:

www.cryer.info
Managed Newsgroup Archive