LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IWebBrowser and navNoReadFromCache Flags

Hello All;
 
I am using the ActiveX IWebBrowser in LabVIEW8.2.1 to send scripts to and from an application.  I am having a problem with the browser loading from the cache after the first load.
 
To get around this, I load my script using IWebBrowser2/Navigate (which will load from the original source first time, and cache every other time), and follow it up with IWebBrowser2/Refresh to force a reload of the source.
 
What I want to do is bypass the Refresh, and set the navNoReadFromCache flag to always go to the original source, but have no idea how to do this (I have not been able to find any examples of this).
 
Does anyone have an example how to do this?  Please advise.
 
Thanks and Regards,
DJH
0 Kudos
Message 1 of 15
(6,299 Views)
Hi Hannamon,

Here is a link to a kb. At the bottom of this knowledgebase, there is a link to the MSDN knowledgebase that explains all the functions of IWebBrowser. That might be helpful.


Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 2 of 15
(6,277 Views)
Hello Again;
 
Actually, I am already aware of the link, which is where I found out about navNoReadFromCache.  But thanks!
 
My particular issue is not WHAT I need to apply, but specifically HOW I need to apply it... in this instance, I have no experience doing this; nor have I found any LabVIEW examples on either NI's site or on the web.
 
I have attached a simple JPG of part of my design.  What and how do I connect to the Flags input to get me where I need to be?  Everything I've tried so far has been unsuccessful.
 
Thanks!
DJH
0 Kudos
Message 3 of 15
(6,265 Views)
DJH,

Can you post a simplified version of your code (removing everything unecessary)? Can you also list everything that you have tried (so I don't try to reinvent the wheel)?

Thanks!

Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 4 of 15
(6,247 Views)
DJH,

Can you please explain how you able to get navNoreadfromcache and how you have wired this to Navigate? I wasn't able to find this in LV (did find notes on this in MSDN).


Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 5 of 15
(6,237 Views)
Hello Again;
 
I have attached a simplified VI, as per request.  Please note that in this example, the PHP script I'm using will not work for you if you try to run it (internal use only), but the idea could be applied to any web page, I suppose.  Also, the verification portion (i.e. Verify Snap Issued) is extremely simplistic - that is not the part to worry about.
 
The main issue is with the "Snapshot URL" page.  I haven't tried a whole lot, since my experience with this is pretty much NIL, apart from the web browser examples that NI provides, or that I have found on the Discussion Forums.  Things like taking a script specifying "navNoReadFromCache=0x04" (and so on), using the "to variant" converter.
 
Bottom line is, I need to ensure that when I load a script (or web page, for that matter), that the cache is not accessed, and the information is collected from the original source.
 
The purpose of this application is as follows:
(1) Send a snapshot command to a camera to take an image.  The snapshot command is actually a web-based script that contains a sequence of operands which are delivered to the camera (how is not important, specifically, other than the fact that it is web-based).
(2) The camera sends a we-based reply that acknowledges the snap command has been received and processed.  An html "OK" is returned.  This is specifically where the problem is.  If the web browser is not always updated (hence the Refresh), then whatever the original response was, that is only what is ever seen.
(3) Depending on if the reply was OK or an error, the result send some kind of message to the user.
 
Insofar as what I have found, the same knowledge base that is listed in an earlier post is what I actually found, which led me to the MSDN website telling me about the navNoReadFromCache flag.  Since in the IWebBrowser2 node is a Flag input, I'm assuming that I can somehow wire this to get the effect I am looking for.  Insofar as how to wire it up, no clue.  Maybe this is the way to go; perhaps there is another method also.
 
Appreciate any assistance.  Thanks!
 
DJH
0 Kudos
Message 6 of 15
(6,224 Views)
Hi DJH,

Is this the forum you were referring to? Its going to take me a few days to look into this and figure out what can be done.
Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 7 of 15
(6,208 Views)
Hello Karunya;

Yes, I believe it was.

By all means, please let me know what you come up with. I shall look forward to your reply!

DJH
0 Kudos
Message 8 of 15
(6,197 Views)

Hi Again;

I was wondering if there has been any progress on this?  Please advise.  Thanks!

DJH

0 Kudos
Message 9 of 15
(6,154 Views)

Hey DJH,

I have been unable to figure out a method as yet. I am going to talk to a few of my colleagues and see what can be figured out.

Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 10 of 15
(6,142 Views)