网站配置了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.

原因可能是:

. HTTPS页面里动态的引入HTTP资源,比如引入一个js文件,会被直接block掉的
. 在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页面是非常糟糕的选择。

转载 Mixed Content Page的更多相关文章

  1. Mixed Content: The page at 'https://a.t.com/login' was loaded over HTTPS, but requested an insecure stylesheet 非全站https

    Mixed Content: The page at 'https://a.t.com/login' was loaded over HTTPS, but requested an insecure ...

  2. Mixed Content: The page at 'xxx' was loaded over HTTPS, but requested an insecure resource 'xxx'.

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

  3. 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 HT ...

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

    问题描述 为通过安全测试, 系统升级为https, 后由于新增了接口(页面集成方式, 即第三方系统某一个界面需要嵌入到我们系统的某个页面中) 采用iframe和重定向方式都报同样的错误, 意思就是我们 ...

  5. mixed content 混合内容

    什么是混合内容? 当用户访问使用HTTPS的页面时,他们与web服务器之间的连接是使用SSL加密的,从而保护连接不受嗅探器和中间人攻击. 如果HTTPS页面包括由普通明文HTTP连接加密的内容,那么连 ...

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

    转自:http://blog.csdn.net/crazy_zihao/article/details/51557425 前言 在使用WebView加载https资源文件时,如果认证证书不被Andro ...

  7. 解决nginx反向代理Mixed Content和Blockable问题

    nginx配置https反向代理,按F12发现js等文件出现Mixed Content,Optionally-blockable 和 Blockable HTTPS 网页中加载的 HTTP 资源被称之 ...

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

    iframe引入视频的文件的时候报这个错 其实只要改成 加上一个s就好了  ...

  9. (转载)Android content provider基础与使用

    android有一个独特之处就是,数据库只能被它的创建者所使用,其他的应用是不能访问到的,所以如果你想实现不同应用之间的数据共享,就不得不用content provider了.在Android中,co ...

随机推荐

  1. EAST 自然场景文本检测

           自然场景文本检测是图像处理的核心模块,也是一直想要接触的一个方面. 刚好看到国内的旷视今年在CVPR2017的一篇文章:EAST: An Efficient and Accurate S ...

  2. python pivot() 函数

    以下为python pandas 库的dataframe pivot()函数的官方文档: Reshape data (produce a “pivot” table) based on column ...

  3. tp模型和数据库操作方法

    一.新建的模型名和表名一样,采用驼峰式,如表名user_type模型取名为UserType namespace app\index\model;use think\Model;class UserTy ...

  4. 【C语言】C语言程序所占内存分类

    参考"http://blog.sina.com.cn/s/blog_63d4849c01014qg3.html" C语言内存分为5部分:堆.栈.全局(静态)区.常量区(只读)和代码 ...

  5. tornado长轮询

    1.什么是长轮询顾名思义,长轮询就是不停循环请求服务器,获取最新信息.长轮询分为两类:1)浏览器以固定时间间隔向服务器发送请求缺点是轮询频率要足够快,但又不能太频繁,否则当成百上千个客户端不断请求,会 ...

  6. 从零开始,跟我一起做jblog项目(二)Maven

    从零开始,跟我一起做jblog项目(一)引言 从零开始,跟我一起做jblog项目(二)Maven maven是一个项目管理工具,尤其适用于JAVA世界 在jblog的开发前期,还没有系统使用过mave ...

  7. dbcp 详细配置

    1.配置参数 username : 连接用户名 password:  连接密码 url :  连接 url( 如果连接 mysql ,格式为 jdbc:mysql://ip:port/dbname) ...

  8. Linux Ubuntu 打开.exe文件

    这两天在编译Android源码,进行到要在Linux里安装烧录软件那一步,要先装驱动,故了解了如何在linux下打开.exe文件. .exe 文件在linux下不能直接打开,可有两种方式打开:. 1. ...

  9. CodeForces 35D Animals

    G - Animals Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit  ...

  10. 一些lua代码

    1.把k--v表转化为数组表,只支持2级 2.取中值 3.字符串按每行最多n像素分割,并返回每行最大宽度,可以用"\n"手动换行