【发布时间】:2014-11-30 14:15:28
【问题描述】:
假设我有以下 IFRAME。只要浏览器使用 HTTP 查看页面,它就可以正常工作,但是,如果浏览器使用 HTTPS 查看页面,则会导致错误,并且必须将 IFRAME 更改为也使用 HTTPS。
<iframe id="sitePreview" name="sitePreview" src="http://preview.administrator.test6.example.com/index.php?cid=17&preview=1330668404"></iframe>
如果不使用服务器脚本根据用于查看页面的协议来自定义 HTML 的协议,是否可以创建 URI 以便它们同时使用 HTTP 和 HTTPS?
另外,如果这适用于其他链接,请发表评论,例如:
<img alt="Map" src="http://maps.google.com/maps/api/staticmap?markers=color:blue|31 Milk St Boston MA&zoom=14&size=400x400&sensor=false" class="map">
<script src="http://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places" type="text/javascript"></script>
【问题讨论】:
标签: html http url iframe https