views:

358

answers:

1

I have embedded an IE control in a Win32 app. The only purpose of this app is to ensure that a URl is always loaded and being refreshed every N minutes.

My problem is that almost always the first time the URL is accessed the CSS and JS files are not loaded. This behavior repeats randomly while the application is running.

My webserver is not even registering the attempt by the browser to obtain the CSS and JS files. I don't know why, but the browser control is not asking for them from time to time.

Anyone have an idea what could be causing this erratic behavior? How can I debug this?

A: 

If the purpose is to load URIs, why use the IE control? You can't predict when it will cache. Instead use the the WinInet API

http://msdn.microsoft.com/en-us/library/aa383630(VS.85).aspx

Here's a tutorial

You need to set the desired caching behavior, but you can just program what you want it to do directly without depending on the behavior of the control. You can parse the result to make sure you get it right (check for the right HTTP result, parse the text, etc)

Lou Franco