Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Webbrowser control refresh issue 3

Status
Not open for further replies.

wraygun

Programmer
Dec 9, 2001
272
US
Is there a method to force a webbrowser control to download a fresh copy of the navigated page? (rather than a cached copy).

Here's what I'm doing:

I'm downloading an html page that loads a 1MB picture into a webbrowser control. I'm timing the the load time so I can approximate the users actual connection speed.

Any help would be greatly appreciated.

Thanks,
Harold

***You can't change your past, but you can change your future***
 

Have a look at the Refresh2 Method - it takes a parameter for Refresh type

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
(As John says) I think if you pass 3 it refreshes completely;

WebBrowser1.Refresh2 3

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
I have found the only way to get this to work **100%** is to delete the cache every time you call a page.
(Used a 3rd party .ocx to clear the cache.)

Maybe !! i missed something in the refresh2 commands.

If you get the refresh2 to work 100%, would appreciate your comment.

Regards Kennedymr2
 
No, I never got it to work in the same way that doing CTRL+Refresh in a browser works, and I've no idea why.

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
Andy,

I did a lot of searching in this area and did find several references to the effect , this function .refresh2 does not work as designed ,100%.

Found an ocx to clear the cache, and it has worked perfectly since.

BUT Clearing the cache is a nuisance, as it clears all items all the time.

If the cache is large, on the 1st instance of running the clear cache , it takes a while to clear.

Regards Kennedymr2

 
Hi everyone!

Thanks for your responses to this subject. I ultimately decided that the inet control was better for what I was doing because it doesn't automatically store the data in cache. (and I couldn't get the webbrowser control to function like I wanted) Again, thanks a bunch.

-Harold

***You can't change your past, but you can change your future***
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top