转自: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.的更多相关文章

  1. 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 ...

  2. 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/. ...

  3. 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的问 ...

  4. 【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 ...

  5. 【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 ...

  6. 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却是正常加载的,总以为是代码写错了, 经过再三的检查以及百度查找,确认 ...

  7. 如何解决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", ...

  8. 跨域问题:Cross origin requests are only supported for protocol schemes: http...

    跨域:Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extensi ...

  9. 本地数据访问时出现跨域问题Cross origin requests are only supported for protocol schemes: ……

    从桌面找到Chrome图标,右键属性,快捷方式,起始位置(安装路径) 注:在cmd中访问Program Files文件的方法 %ProgramFiles%=C:\Program Files %Prog ...

随机推荐

  1. python写xml及几个问题

    python写xml的库和用法 几个问题: 1.乱码问题 设写入UTF-8编码 write函数增加encoding='utf-8' 2.空元素xml节点简写及完整写 write函数增加 short_e ...

  2. stopPropagation()阻止事件的冒泡传递

    <!doctype html><html><head><meta charset="utf-8"><title>无标题文 ...

  3. 杂项:TMT(数字媒体产业)

    ylbtech-杂项:TMT(数字媒体产业) TMT(Technology,Media,Telecom),是科技.媒体和通信三个英文单词的缩写的第一个字头,整合在一起.含义实际是未来(互联网)科技.媒 ...

  4. JAVA虚拟机关闭钩子(Shutdown Hook)

    程序经常也会遇到进程挂掉的情况,一些状态没有正确的保存下来,这时候就需要在JVM关掉的时候执行一些清理现场的代码.JAVA中的ShutdownHook提供了比较好的方案. JDK提供了Java.Run ...

  5. IRQL Ring0实现

    一,IRQL的定义Interrupt ReQuest Level     DDK对IRQL的定义是:中断请求级(IRQL)标示中断的优先级.处理器在一个IRQL上执行线程代码,IRQL是帮助决定线程如 ...

  6. python之路——2

    王二学习python的笔记以及记录,如有雷同,那也没事,欢迎交流,wx:wyb199594 复习 1.编译型:一次性将全部的代码编译成二进制文件 c c++ 优点:运行效率高 缺点:开发速度慢,不能跨 ...

  7. 在 Element-UI 的 Table 组件上添加列拖拽效果

    Element-UI 的 Table组件很强大,但是我们的需求更强大... 简单粗暴的来一发效果图: 一.数据驱动 传统的拖动效果,都是基于通过 mousedown.mousemove.mouseup ...

  8. css定位(后盾网)

    1.绝对定位:脱离了文档流,如果设置了left和top,位置相对浏览器来定位,如果不设值top和left,还是按照原来的文档流的位置站位,位置移走后,原来的空间位被其他元素占据 ***应用:一般来说我 ...

  9. npm 淘宝镜像

    npm config set registry https://registry.npm.taobao.org

  10. 移植vsftpd到arm linux

    vsftpd即very secure FTP daemon(非常安全的FTP进程),是一个基于GPL发布的类UNIX类操作系统上运行的服务器的名字(是一种守护进程),可以运行在诸如Linux.BSD. ...