473,396 Members | 1,590 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,396 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 3761
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.