转载 Mixed Content Page

网站配置了https之后,网页上的百度地图无法正常显示,报错类似于:

Mixed Content: The page at ‘https://url_1‘ was loaded over HTTPS,
but requested an insecure script ‘http://monitor_analytic.js‘.
This request has been blocked; the content must be served over HTTPS.

原因可能是:

1. HTTPS页面里动态的引入HTTP资源,比如引入一个js文件,会被直接block掉的
2. 在HTTPS页面里通过AJAX的方式请求HTTP资源,也会被直接block掉的。

提出的解决办法:

方法1:相对协议。
对于同时支持HTTPS和HTTP的资源,引用的时候要把引用资源的URL里的协议头去掉,
浏览器会自动根据当前是HTTPS还是HTTP来给资源URL补上协议头的,可以达到无缝切换。

下面是回答中有人给出的解决办法:http://thehackernews.com

The search engine giant recommended you to enable it via an HTTP response header,
"Content-Security-Policy: upgrade-insecure-requests," if all the content is controlled by you.

However, if the unsecure resources are served from a web server you don’t control, you can include the
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> tag in your page‘s <head>.

对于https协议下访问http的图片链接,chrome浏览器并没有block,而是提出了警告。但是并不是所有手机的webkit浏览器都支持这样的警告,很多手机可能还是会直接block,造成图片没有办法显示

总结:对于mixed content page that the connection is only partially encrypted. 为了在http转https的过程中顺利过渡,mixed content page页面是非常糟糕的选择。

时间: 2024-08-09 06:21:53

转载 Mixed Content Page的相关文章

Mixed Content: xxx This request has been blocked; the content must be served over HTTPS.

在升级https的过程中,出现如下问题: Mixed Content: The page at 'https://www.xxx.com/denglu.html' was loaded over HTTPS, but requested an insecure script 'http://qzonestyle.gtimg.cn/qzone/openapi/qc-1.0.1.js'. This request has been blocked; the content must be serve

Mixed Content混合内容错误 Iframe Http页面无法访问

问题描述 为通过安全测试, 系统升级为https, 后由于新增了接口(页面集成方式, 即第三方系统某一个界面需要嵌入到我们系统的某个页面中) 采用iframe和重定向方式都报同样的错误, 意思就是我们系统是https, 第三方系统是http, 请求被block了. 下面是chrome报错的内容: Mixed Content: The page at ’ was loaded over HTTPS, but requested an insecure resource ‘xxxxxxxxxxxxx

Android webview Mixed Content无法显示图片解决

转自:http://blog.csdn.net/crazy_zihao/article/details/51557425 前言 在使用WebView加载https资源文件时,如果认证证书不被Android认可,那么会出现无法成功加载对应资源问题.那么,我们就要针对这一状况作出对应的处理. 解决步骤 1. 启用mixed content 在Android5.0中,WebView方面做了些修改,如果你的系统target api为21以上: 系统默认禁止了mixed content和第三方cookie

浏览器报Mixed Content错误的解决

正常来说一个网页中要么全部使用http,要么全部使用https 但是偶尔有些不完善的库自己会写死了调用的链接. 一个简单的方法是在网页的head下加入下面这句 <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> 这将会把http请求转化为https请求.这样就不会再出现Mixed Content的错误了. 原文地址:https://www.cnbl

Mixed Content: The page at ‘https://XXX’ was loaded over HTTPS, but requested an insecure........

iframe引入视频的文件的时候报这个错 其实只要改成 加上一个s就好了  ... 原文地址:https://www.cnblogs.com/antyhouse/p/9178905.html

错误:Mixed Content: The page at ‘https://XXX’ was loaded over HTTPS, but requested an insecure.......

服务器是:https的,然后七牛云用了http,就会报错,所以,需要换成https,就可以了. 原文地址:https://www.cnblogs.com/zxyun/p/12394739.html

谈谈HTTP/2对前端的影响【转载】

原文:http://www.peep-squirrel.com/itcontent-2500617.html 随着 HTTP/2 规范的确认,以及主流浏览器(Chrome.Firefox.IE11)对其的全面支持,是时候采用新协议了.看了很多博文跟官方说明,在此做个总结, 为什么要有 HTTP/2 ? HTTP/2给前端带来哪些影响? 减少HTTP请求不一定提升性能 压缩仍然需要 如何使用 HTTP/2 ? 创建证书 搭建服务 验证 如何使用 PUSH ? HTTP/2 部署现状 客户端 服务端

This content should also be served over HTTPS

HTTPS 是 HTTP over Secure Socket Layer,以安全为目标的 HTTP 通道,所以在 HTTPS 承载的页面上不允许出现 http 请求,一旦出现就是提示或报错: Mixed Content: The page at 'https://domain.com/w/a?id=074ac65d-70db-422d-a6d6-a534b0f410a4' was loaded over HTTPS, but requested an insecure image 'http:

WPF 中Frame + Page 的使用

1 在window 的设计的时候 ,中间需要进行页面切换的时候,顶一个Frame [html] view plain copy <Frame Name="MainPage"  NavigationUIVisibility="Hidden" Grid.RowSpan="1"  Grid.Row="0"  ScrollViewer.CanContentScroll="False"   VerticalAl