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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force IE object to refresh from web not cache 1

Status
Not open for further replies.

SnyAc

Programmer
Jul 25, 2001
272
US
I need to be able to force an I.E. object to navigate or refresh from the internet, and not from the cached pages. On most of my installation sites the IE object seems to refresh normally, but I have observed a number of sites where the page displayed doesn't update and remains frozen on the cached page. This is an automated IE object.

Any suggestions/ideas would be greatly appreciated.

Andy Snyder
SnyAc Software Services
 
Are you using HTML pages? If so put this somewhere at the top
Code:
<meta http-equiv="refresh" content="60">

This will refresfh the page every 60 seconds.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
I'm working from the otner side of the server/client relationship.

Code:
oIE=CREATEOBJECT("InternetExplorer.Application")
oIE.navigate("myurl")


Andy Snyder
SnyAc Software Services
 
Then one trick you could use is to add a tag that does not exist at the end of your URL, that way internet explorer will look for the tag an not find it and force a redownload of the page.
Code:
myURL = '[URL unfurl="true"]www.microsoft.com#temptag'[/URL]
oIE=CREATEOBJECT("InternetExplorer.Application")
oIE.navigate(myurl)



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
It seems to be dependent on IE's cache setting. I assume that that's stored in the registry and could be changed programmatically. Since the only app I have that might care is for my personal use, I just make sure the setting is 'every time I visit a web page' under tools->options->temp files (exact is IE version dependent).

Brian
 
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache

Value: Persistent
DWORD: 00000001

You can see VFP samples for registry change code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top