Jump to content

html in Labview clearing browing data


Recommended Posts

Hi friends,

I am developing a LV application where I load webpages in Labview and I test the LED/Slider bars of the webpages. I can change the values of LEDs and other indicators thru' a simulator.

But the changes are not reflected in the webpage because my Labview browser is loading the previous page(from memory..?!). I tried 'Refresh' invoke property- didn't work.

Is there a way to clear memory and load the webpages?

post-16569-0-20863100-1298528149_thumb.j

Thanks,

Sharon

Link to comment

You can append a random variable to the URL. But first a quick primer on URLs:

  • "http://" is the protocol
  • "www.example.com" is the host name (the computer the web page is on)
  • "/some/place.html" is the path
  • "?random=SomeRandomValue" is the query string

The query string is a question mark (?) followed by a set of "variable=value"s, separated by ampersands (&). So if your URL is http://www.a.com/b.html you could make it http://www.a.com/b.html?rand=1234. If your original URL already had a query string (e.g. http://www.a.com/b.html?a=1) then you'd use http://www.a.com/b.h...?a=1&rand=1234. That will force the page to reload because the browser recognizes that could be a different page.. Just remember to use a different random each time.

That's a common problem in a number of programming situations not just limited to LabVIEW. The HTTP protocol has metadata saying how long to keep a cached copy around and also metadata to say if a file is newer than another copy. I'm not sure if your web server isn't sending that data, it's sending the wrong data, or LabVIEW isn't respecting that.

  • Like 2
Link to comment

You can append a random variable to the URL. But first a quick primer on URLs:

  • "http://" is the protocol
  • "www.example.com" is the host name (the computer the web page is on)
  • "/some/place.html" is the path
  • "?random=SomeRandomValue" is the query string

The query string is a question mark (?) followed by a set of "variable=value"s, separated by ampersands (&). So if your URL is http://www.a.com/b.html you could make it http://www.a.com/b.html?rand=1234. If your original URL already had a query string (e.g. http://www.a.com/b.html?a=1) then you'd use http://www.a.com/b.h...?a=1&rand=1234. That will force the page to reload because the browser recognizes that could be a different page.. Just remember to use a different random each time.

That's a common problem in a number of programming situations not just limited to LabVIEW. The HTTP protocol has metadata saying how long to keep a cached copy around and also metadata to say if a file is newer than another copy. I'm not sure if your web server isn't sending that data, it's sending the wrong data, or LabVIEW isn't respecting that.

Hi Mike,

Yeah...it works..thumbup1.gif Yes it does. Thank you very much... worshippy.gif

-Sharon biggrin.gif

P.S:

for other junior Labview developers. the '?' symbol could also be followed by ".html"-(for eg: http://abc.com/read.cgi?page=templates/admin_masterconfig.html&Sharon=12)

in that case we will use only '&' symbol like "&random=xxx" not one more '?random=xxx'- it will show an error.oops.gifbiggrin.gif

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.