M
Martin Ho
Hey Everyone,
I really hope there is someone who can figure out this problem.
Honestly, I spent 3 days now trying to find the solution, but nothing
works.
I'll try to explain the problem shortly, so I don't take too much of
your time.
Problem:
On the form I have AxWebBrowser box, and I load the page in it,
normally you would do it like this:
Dim finalurl as string = "http://www.mysite.com/example.php"
AxWebBrowser1.Navigate2(finalurl)
I set up a timer1 tick to go off every 10 minutes.
Example.php I am trying to load is a php script which comes up to have
different variables everytime you reload/refresh it.
In my case everytime I call the page, variables are the same. It never
refreshes it.
So I did my research and there was a suggestion to do this:
AxWebBrowser1.Refresh2(finalurl)
AxWebBrowser1.Navigate2(finalurl)
So I did another research and there was a suggestion to do this:
Dim finalurl as string = "http://www.mysite.com/example.php"
Dim REFRESH_COMPLETELY As Object = 3
AxWebBrowser1.Refresh2(REFRESH_COMPLETELY)
AxWebBrowser1.Navigate2(finalurl)
Well, this didn't work either.
So after another day of browsing Google, I found that someone
suggested to do this:
Private Enum BrowserNavConstants As Integer
navOpenInNewWindow = &H1
navNoHistory = &H2
navNoReadFromCache = &H4
navNoWriteToCache = &H8
navAllowAutosearch = &H10
navBrowserBar = &H20
navHyperlink = &H40
End Enum
and then call AxWebBrowser like this, so it is using property called:
navNoReadFromCache
AxWebBrowser1.Navigate2(finalurl,
BrowserNavConstants.navNoReadFromCache, Nothing, Nothing, Nothing)
Well, this doesn't work either and my application is not refreshing
the values, which I need to bring into the program.
Guys, I am really lost and I've got to the point of resignation. I
simly can't get it to work and no one can figure out how to do this.
Someone suggested to delete cookies and temporary cache files which
this php page is creating.
But that is not easy, location differs from pc to pc, and from
platform to platform and Ireally believe, that there should be some
other way of doing it.
Now, one valid point and that might be a help.
While application is running and refreshing values every 10 minutes,
NOTHING CHANGES, variables are still the same.
But if I open my Internet Explorer and go to the page (example.php),
it shows me updated values.
And my program as if someone used a magic stick, refreshes too.
So, what should I do? Is there any, and I mean any way, to refresh,
reload AxWebBrowser?
Any way to make it, so it doesn't read the page from cache?
Please, your help will be greatly appreciated.
Martin Ho.
I really hope there is someone who can figure out this problem.
Honestly, I spent 3 days now trying to find the solution, but nothing
works.
I'll try to explain the problem shortly, so I don't take too much of
your time.
Problem:
On the form I have AxWebBrowser box, and I load the page in it,
normally you would do it like this:
Dim finalurl as string = "http://www.mysite.com/example.php"
AxWebBrowser1.Navigate2(finalurl)
I set up a timer1 tick to go off every 10 minutes.
Example.php I am trying to load is a php script which comes up to have
different variables everytime you reload/refresh it.
In my case everytime I call the page, variables are the same. It never
refreshes it.
So I did my research and there was a suggestion to do this:
AxWebBrowser1.Refresh2(finalurl)
AxWebBrowser1.Navigate2(finalurl)
So I did another research and there was a suggestion to do this:
Dim finalurl as string = "http://www.mysite.com/example.php"
Dim REFRESH_COMPLETELY As Object = 3
AxWebBrowser1.Refresh2(REFRESH_COMPLETELY)
AxWebBrowser1.Navigate2(finalurl)
Well, this didn't work either.
So after another day of browsing Google, I found that someone
suggested to do this:
Private Enum BrowserNavConstants As Integer
navOpenInNewWindow = &H1
navNoHistory = &H2
navNoReadFromCache = &H4
navNoWriteToCache = &H8
navAllowAutosearch = &H10
navBrowserBar = &H20
navHyperlink = &H40
End Enum
and then call AxWebBrowser like this, so it is using property called:
navNoReadFromCache
AxWebBrowser1.Navigate2(finalurl,
BrowserNavConstants.navNoReadFromCache, Nothing, Nothing, Nothing)
Well, this doesn't work either and my application is not refreshing
the values, which I need to bring into the program.
Guys, I am really lost and I've got to the point of resignation. I
simly can't get it to work and no one can figure out how to do this.
Someone suggested to delete cookies and temporary cache files which
this php page is creating.
But that is not easy, location differs from pc to pc, and from
platform to platform and Ireally believe, that there should be some
other way of doing it.
Now, one valid point and that might be a help.
While application is running and refreshing values every 10 minutes,
NOTHING CHANGES, variables are still the same.
But if I open my Internet Explorer and go to the page (example.php),
it shows me updated values.
And my program as if someone used a magic stick, refreshes too.
So, what should I do? Is there any, and I mean any way, to refresh,
reload AxWebBrowser?
Any way to make it, so it doesn't read the page from cache?
Please, your help will be greatly appreciated.
Martin Ho.