Flash:Getting non-cached results from IE / Firefox using LoadVariables

Posted: May 22, 2010 in Flash, Non Insteon Programming, Uncategorized
Tags: , , , ,

Just thought I’d post this little tidbit.  When using Flash/action script to call the infamous ‘Loadvariables’ functions I have found that some browsers like IE like to grab cached results, for some reason it worked fine in Firefox but if you try to embedded IE in your programs you will run into the same problems.

In my case I call the same function and the server side takes care of the action.  And if your like me you may be calling the same page more than once quickly.  This issue got me for days, and worked on some computers and other didn’t.

So when calling your pages just add a fictional variable not used by your pages, I called my cache_buster and add ‘date’ and ‘time’  to get a 8-15 character number that should be unique, tricking the browser you are looking for a unique page and not grab from cache

loadVariables("http://192.168.0.2:85/finddata.aspx?show_all_configs=1&cache_buster="+new Date().getTime(), this);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s