admin 管理员组文章数量: 1086019
I'm getting the cross-domain error on my local machine (although the code works perfectly on our web server). This is a real pain in the butt for development, so what I'm wondering is this - can I adjust a setting in Chrome to not get that error locally anymore?
It's this one:
Unsafe JavaScript attempt to access frame with URL file:///Users/david/login.html from frame with URL file:///Users/david/varReturn.html. Domains, protocols and ports must match.
Thanks!
I'm getting the cross-domain error on my local machine (although the code works perfectly on our web server). This is a real pain in the butt for development, so what I'm wondering is this - can I adjust a setting in Chrome to not get that error locally anymore?
It's this one:
Unsafe JavaScript attempt to access frame with URL file:///Users/david/login.html from frame with URL file:///Users/david/varReturn.html. Domains, protocols and ports must match.
Thanks!
Share Improve this question asked Sep 21, 2012 at 1:51 maskedbaconmaskedbacon 1434 silver badges15 bronze badges1 Answer
Reset to default 9Google has decided that offline file access is cross-domain, regardless. You can try running chrome with --allow-file-access-from-files
. I encountered the same problem when reading text files from the same folder using JavaScript.
本文标签: javascriptCrossdomain error with Chrome in local dev only How to resolveStack Overflow
版权声明:本文标题:javascript - Cross-domain error with Chrome in local dev only. How to resolve? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/p/1744049626a2524777.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论