如何避免我的 swf 被缓存在内存中?,我读到我必须使用这样的东西:
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
就这样?
如何避免我的 swf 被缓存在内存中?,我读到我必须使用这样的东西:
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
就这样?
我使用 get param 来避免缓存,例如 myswf.swf?date 或 myswf.swf?random
我正在使用 swfobject 将 swf 加载到 html 页面。这里给你一个例子。
"myContent.swf?"+Math.random()*321 -> 这使得 swf 没有缓存。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>SWFObject dynamic embed - step 3</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("myContent.swf?"+Math.random()*321, "myContent", "300", "120", "9.0.0");
</script>
</head>
<body>
<div id="myContent">
<p>Alternative content</p>
</div>
</body>
</html>
您还可以将 expires 标头与已经过去的日期一起使用:
<!-- BEGIN INSERT -->
<META HTTP-EQUIV="Expires" CONTENT="Mon, 04 Dec 1999 21:29:02 GMT">
<!-- END INSERT -->
但是,是的,仅此而已!