oppure:
codice:
// Prevents caching of loaded files (TXTs, SWFs, XMLs etc...)
// Latest version (1.1)
String.prototype.noCache = function(){
var isSWFinHTML = (_level0._URL.indexOf("file:///")==-1);
var isURLlocal = (this.indexOf("://")==-1);
if (isSWFinHTML || !isURLlocal){
this += (this.indexOf("?")==-1) ? "?" : "&";
this += "noCache=" + (new Date().getTime());
}
return this;
}
/*
// Old version (1.0)
String.prototype.noCache = function(){
if ((_root._URL.substr(0,5)).toLowerCase()!="file:"){
if(this.indexOf("?")==-1){
return this+="?noCache="+(new Date().getTime());
}else{
return this+="&noCache="+(new Date().getTime());
}
}else{
return this;
}
}
*/
uso:
codice:
loadMovieNum("File.swf".noCache(), 1);
o
loadVariablesNum("File.txt".noCache(), 1);
o
myXML.load("File.xml".noCache());