Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
转自:https://www.zhihu.com/question/20948649?sort=created
我最近也遇到这个问题了,用传统的快捷方式加参数并没有用,不知道是不是和chrome版本有关系,经过我的一顿瞎试验,发现了可以这么干


在命令行用start启动chrome,然后加参数--disable-web-security --user-data-dir="E:/aaa",
像图里,我的chrome是在C:\Users\admin\AppData\Local\Google\Chrome\Application这里的,你的自己找找


然后参数--disable-web-security 必须和参数--user-data-dir配合使用,只有disable那个参数并不好使,再有就是这个路径问题,这个路径可以用window里的tmp路径,我当时为了试试就随便用个了E:/aaa。
这方法我用着有效,你可以试试看了,也可以试着多加几个参数,比如
start chrome.exe --allow-file-access-from-files --disable-web-security --user-data-dir="E:/aaa"
最后的最后,我想说,不要问我为什么这样,我也不知道,就像葫芦娃为什么会变成小金刚一样
Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.的更多相关文章
- jquery读取本地文件,Windows上报错。XMLHttpRequest cannot load xxx. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.k.cors.a.c
问题: 测试报告,使用本地的json.txt文件,结果文件读取失败,报错如下: XMLHttpRequest cannot load xxx. Cross origin requests are on ...
- nodejs报错 XMLHttpRequest cannot load localhost:3000/test_date/. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
z在请求本地的时候 如果ajax的URL 前面没有http的话 就会报错 jq.js:2 XMLHttpRequest cannot load localhost:3000/test_date/. ...
- Cross origin requests are only supported for protocol schemes: http, data, chrome,chrome-extension的问题
Cross origin requests are only supported for protocol schemes: http, data, chrome,chrome-extension的问 ...
- 【chrome错误】Cross origin requests are only supported for protocol schemes: http, data,chrome-extension, https, chrome-extension-reso
使用ajax请求本地文件,chrome会报跨域错误. XMLHttpRequest cannot loadfile:///C:/Users/Li/Desktop/images/alist.json.C ...
- 【Google Chrome】 Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource问题解决
问题??打开Google Chrome浏览器报错如下: 结论 浏览器出于安全性考虑,默认对跨域访问禁止 解决方法 给浏览器添加启动参数 --allow-file-access-from-files ...
- XMLHttpRequest cannot load file:///E:/userdialog.html?_=1465888805734. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-reso
做前端写静态页面时,采用的是jq easyui框架 在ie与webkit总是加载的时候总是在loading... 而firefox却是正常加载的,总以为是代码写错了, 经过再三的检查以及百度查找,确认 ...
- 如何解决XMLHttpRequest cannot load file:~~~~~~~~~~~. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-res
原因:Chrome不支持本地Ajax请求. 解决: 右击Chrome浏览器快捷方式,选择“属性”,在“目标”中加上"--allow-file-access-from-files", ...
- 跨域问题:Cross origin requests are only supported for protocol schemes: http...
跨域:Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extensi ...
- 本地数据访问时出现跨域问题Cross origin requests are only supported for protocol schemes: ……
从桌面找到Chrome图标,右键属性,快捷方式,起始位置(安装路径) 注:在cmd中访问Program Files文件的方法 %ProgramFiles%=C:\Program Files %Prog ...
随机推荐
- 【springmvc】之使用jQuery接收前端传入List对象
前端代码: <form id="person_add" method="post" action="user"> <tab ...
- JSON 使用
ylbtech-JSON: JSON 使用 1. 把 JSON 文本转换为 JavaScript 对象返回顶部 JSON 最常见的用法之一,是从 web 服务器上读取 JSON 数据(作为文件或作为 ...
- VRRP、Track与NQA联动配置举例(Master监视上行链路)
原文 http://www.h3c.com/cn/d_201708/1018729_30005_0.htm#_Toc488338729 1. 组网需求 Host A需要访问Internet上的Host ...
- windows server 2008 R2 安装
微软服务器操作系统大致有: server 2000(简称2K),还有server 2003(2K3),server 2008(2K8),server 2000和2003是基于NT内核的,而2008是基 ...
- 关于购物车程序的Python实现
''' 需求:1.启动程序后,输入用户名密码后,让用户输入工资,然后打印商品列表 2.允许用户根据商品编号购买商品 3.用户选择商品后,检测余额是否够,够就直接扣款,不够就提醒 4.可随时退出,退出时 ...
- Python函数式编程-高阶函数、匿名函数、装饰器、偏函数
- sql server 日志传送问题整理
1.数据库备用/只读状态恢复为联机 SELECT DATABASEPROPERTYEX('ty_szum_oa_v2_bak','IsInStandBy') restore database ty_s ...
- javaweb项目中遇到的一些乱码问题
在做javaweb项目时,我们经常会遇到一些乱码问题: 首先,确定一点思想:要想不乱码,你要保证编码一致就行了,即统一编码~ 其一,jsp等页面中的中文显示乱码(这里不只是说jsp文件,其它文件也有这 ...
- 「一本通 6.4 例 4」曹冲养猪(CRT)
复习一下 扩展中国剩余定理 首先考虑两个同余方程 \[ x \equiv a_1\; mod\; m_1\\ x \equiv a_2\; mod\; m_2 \] 化成另一个形式 \[ x = n_ ...
- [ZJOI2015]诸神眷顾的幻想乡(广义后缀自动机)
/* 题目中的神仙性质真的是令人愉悦 因为我一眼看成了每个点的度数不超过二十, 心想这他喵的和字符串什么关系 统计树上不同子串个数, 按道理直接dfs n次把所有的串插到后缀自动机里就行了 但是我们发 ...