Just a thought, but maybe setting the variable that holds the XML you
grab from the server to "null" right before it goes to grab the XML
every time the page gets called.
That way it isn't holding on to the last XML grabbed?? It might be
going to grab the xml while that variable already has a value and the
browser is tripping it to clear the variable
before populating it again, but doesn't have that second call after
its cleared till you refresh. Kind of a pseudo variable caching. Like
I said, its just a thought. Not sure if that is even possible.
I am reaching though, I have had similar situations with my PHP files
not getting variables, so I am interested to see what solution can be
provided.
Best,
Karl
On Mar 26, 2010, at 8:46 PM, Nathan Mynarcik wrote:
I've tested it in all browsers.
IE, Safari, Opera, Chrome, FireFox
Anything else I don't really care about. But first tests are in
chrome and it is doing it in that. IE has been the worse but all work
after refreshing one or two times.
------Original Message------
From: Steven Sacks
To: Nathan Mynarcik
To: Flash Coders List
Subject: Re: [Flashcoders] NoCache XML
Sent: Mar 26, 2010 8:36 PM
Safari doesn't honor nocache. Safari is a jerk. Are you using Safari?
On 3/26/2010 3:35 PM, Nathan Mynarcik wrote:
That's similar to what I am doing. I know for a fact that the url
doesn't already have a "?" in it.
I have no clue why on some visits, the colors and other xml data is
not pulled. Then on a refresh it pulls them.
------Original Message------
From: Steven Sacks
To: Nathan Mynarcik
To: Flash Coders List
Subject: Re: [Flashcoders] NoCache XML
Sent: Mar 26, 2010 5:27 PM
It should always work. Perhaps the url of the xml has a ? already
in it?
public function nocache(url:String):String
{
var d:Date = new Date();
var nc:String = "nocache=" + d.getTime();
if (url.indexOf("?")> -1) return url + "&" + nc;
return url + "?" + nc;
}
On 3/26/2010 2:27 PM, Nathan Mynarcik wrote:
Hey everyone,
I am loading in an external xml doc via
loadXML("url of xml");
To prevent browsers from caching the xml, I add at the end of the
url string a Date object like:
loadXML("url of xml"+"?nocache="+new Date().getTime());
This sometimes works and other times doesn't. The xml is the
backbone to the colors used in the UI of my site which goes black
when the load doesn't work properly.
I have tried to add an IOERROREvent function to catch the error
and then supply the url to the load function without the Date
object appended.
Is there any checks or different directions I can take to prevent
visitors from sometimes having to refresh until the xml gets
loaded correctly?
Nathan Mynarcik
Interactive Web Developer
[email protected]
254.749.2525
www.mynarcik.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Nathan Mynarcik
Interactive Web Developer
[email protected]
254.749.2525
www.mynarcik.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Nathan Mynarcik
Interactive Web Developer
[email protected]
254.749.2525
www.mynarcik.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders