04/01/27 如何避免在载入FLASH时IE进行缓存 在
未识别博客 · R.Arul Kumaran [arul@shockwave-india.com] * · 2004-09-22(近似)
04/01/27
如何避免在载入FLASH时IE进行缓存
在网上看到这段代码拿来与大家分享。
//sample usage
#include
"
skipCache.as
"
my_xml =
new
XML
();
my_xml.
onData
=
function
(dta) {
trace
(dta);
};
my_xml.
load
("
myfile.xml
"+getSkipCacheString());
将其加在主帧上。
skipCache.as的代码如下:
/*
**************************************************************
* Developed by R.Arul Kumaran [arul@shockwave-india.com] *
* for more code keep visiting [www.shockwave-india.com/blog] *
**************************************************************
version 1.1 Last updated on 9, Jan 2004
*/
/*
| Useful when you don't want your server files to be cached by both server and browser
|
| getSkipCacheString() - Return a blank string("") when the swf is running as a local file and
| returns a random string like "?CacheBuster=0.0308893630281091×tamp=1073037565155"
| when the swf is from a web server
|
*/
_global
.getSkipCacheString =
function
() {
if
(getSkipCacheString.isLocalPlayback) {
return
""
;
}
dStr =
"×tamp="
+
new
Date
().
getTime
();
return
"?CacheBuster="
+
Math
.
random
()+dStr;
};
getSkipCacheString.isLocalPlayback =
_url
.
indexOf
(
"file"
) == 0;
egoldy
发表于
04/01/27 18:02
引用Trackback(0)
|
编辑
评论
发表评论
用户名:
Email:
主页:
最后更新
mx.utils.Delegate class
swift 3d 作品秀
google local search
UML FOR FLASH
使用外部CSS样式表格式化FLASHMX2004组件
joey lott的自定义表格教程
loriann音乐站点.
flash gamecoder 邮件列表
非常好的游戏基础教程.
FLASH音乐资源2
原始快照:web.archive.org