473,232 Members | 1,635 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,232 software developers and data experts.

AxWebBrowser problem!

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.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Jul 21 '05 #1
4 3755
Hi Martin,

The AxWebBrowser uses the same cache settings as IE does. Why it's
always reading from cache, I can't answer, but I can suggest an
alternative that does not rely on the AxWebBrowser. (It is worth noting
that the AxWebBrowser is buggy, always has been, always will be. One of
the reasons why the System.Net namespace has the
WebClient/WebResponse/WebClient classes).

If you insist on using the browser control, then what I would make sure
of is that your php page is set to expire immediately. Also, you should
set a pragma-no-cache meta tag to be on the safe side.

If you don't need the browser functionality (you had mentioned that you
were reading variables from the php page), I would recommend web page
scraping using the System.Net namespace. (I can't give code samples as I
am not a VB programmer):

http://www.codersource.net/csharp_screen_scraping.html
http://aspalliance.com/cookbook/View...spx?Chapter=21

Using this method, you are never going to cache and you don't have to
deal with ugly ActiveX controls.

HTH,
~d

Martin Ho wrote:
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.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Jul 21 '05 #2

D0tN3t C0d3r wrote:
Hi Martin,

The AxWebBrowser uses the same cache settings as IE does. Why it's
always reading from cache, I can't answer, but I can suggest an
alternative that does not rely on the AxWebBrowser. (It is worth noting that the AxWebBrowser is buggy, always has been, always will be. One of the reasons why the System.Net namespace has the
WebClient/WebResponse/WebClient classes).

If you insist on using the browser control, then what I would make sure of is that your php page is set to expire immediately. Also, you should set a pragma-no-cache meta tag to be on the safe side.

If you don't need the browser functionality (you had mentioned that you were reading variables from the php page), I would recommend web page scraping using the System.Net namespace. (I can't give code samples as I am not a VB programmer):

http://www.codersource.net/csharp_screen_scraping.html
http://aspalliance.com/cookbook/View...spx?Chapter=21

Using this method, you are never going to cache and you don't have to deal with ugly ActiveX controls.

HTH,
~d

Martin Ho wrote:
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.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com


Jul 21 '05 #3
Can anyone help, please?

Jul 21 '05 #4
I've ran into this thread as I was having the same issue.

My solution was to prevent the page itself fom being cached:

response.buffer = true
response.cacheControl = "no-cache"
response.addHeader "Pragma", "no-cache"
response.expires = -1

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mantorok | last post by:
Hi Is there anyway to get a WebBrowser to work without placing it on a form. I want to be able to instantiate a browser, complete some of the fields and submit, but whenever I try to navigate...
3
by: Clint MacDonald | last post by:
I have used the AxWebBrowser in a Visual Basic Project... I found that both Framework 1.0 and 1.1 had to be installed for it to work properly. I now have found that in Studio 2003, that the...
0
by: Martin Ho | last post by:
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...
6
by: MARTIN LANNY | last post by:
Is there alternative to AxWebBrowser? I spent one whole week trying to make AxWebBrowser refresh php page. It never works. I tried over 10-15 suggestions from Microsoft itself. Refresh just...
4
by: Martin Ho | last post by:
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...
12
by: Don Juan | last post by:
I have had a terrible 10 days period with AxWebBrowser ActiveX Control. I can't understand why there is no goog documentation and tutorials for that monster.
5
by: Thom Little | last post by:
I have a windows application that has an update form that uses AxWebBrowser to connect to a distribution site. This site uses a Response.Redirect to download of either a .msi file or a .zip file....
6
by: Dave Booker | last post by:
It appears that I cannot correctly install the AxWebBrowser in VS2005. I can instantiate an "AxWebBrowser browser" and refer to its members, properties, and methods. I'm having trouble with the...
2
by: gkostova | last post by:
Hello, Can someone help me. I use Web Browser in my windows form to display html document using flash and javascript, the problem is that not I canot navigate trought all pages of the flash . Then...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.