https站点内垮域调用资源文件(图片/flash/video/文件/) 避免弹出"含不安全内容"窗口
1. 如页面url:
https://www. go-ahead.com/games/index.html
2. index.html 调用flash代码
<script language="javascript">
if (AC_FL_RunContent == 0) {alert("此页需要 AC_RunActiveContent.js");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '700',
'height', '360',
'src', 'main',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'main',
'bgcolor', '#ffffff',
'name', 'main',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'main',
'flashVars','name='+ GetUrlVar('name'),
'salign', ''
); //end AC code
//alert('name='+ GetUrlVar('name'))
}
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="700" height="360" id="main" align="center">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="main.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="main.swf" quality="high" bgcolor="#ffffff" width="750" height="570" name="main" align="center" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
问题出现:
'codebase', 'http://download.macromedia.com/...'
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
codebase="http://download...."
pluginspage="http:// www...."
这4个地方就是不安全内容,
https协议会检验所有资源调用,不是https协议的外部资源调用都会被认为是不安全内容.
相对路径(本地)没问题
解决办法()
去掉资源url中的"http:" ,
去掉后在服务器上才可以,本机起webserver也行
'codebase', '//download.macromedia.com/...'
'pluginspage', '//www.macromedia.com/go/getflashplayer',
codebase="//download...."
pluginspage=":// www...."
任何资源调用同理