在 Firefox 上,CORS 请求给出错误“:"(冒号)
在 Chrome 上,我可以毫无问题地提出跨域请求,但是在 Firefox (Ubuntu 14.04) 上,我收到一个错误,该错误仅包含调用 xmlhttprequest 的行上的冒号.
On Chrome, I'm having no troubles making a cross domain request, however on Firefox (Ubuntu 14.04), I get an error that consists only of a colon on the line that calls for the xmlhttprequest.
xmlhttp.open("GET", "http://x.x.x.x:xxxx/folder/file.xml", false);
错误信息只是:".
推荐答案
尝试禁用 AdBlock
我遇到了一个类似的问题,我的所有 XMLHttpRequest 都在通过,除了一些非常具体的问题,即使是微小的 URL 更改也可以解决问题.我得到的唯一东西是一个冒号 : 在控制台中.最后,我意识到 AdBlockPlus 至少阻止了其中一个请求通过(该请求的 URL 中有横幅").
Try Disabling AdBlock
I was having a similar issue where all of my XMLHttpRequests were going through except for a few very specific ones where even minor URL changes fixed the problem. And the only thing I was getting was a colon : in the console. In the end I realized that AdBlockPlus was blocking at least one these requests from going through (the request had 'Banners' in the URL).
所以我不确定这是否能解决您的问题,但我遇到过多次.
So I'm not sure if this would have solved your problem, but I've encountered it multiple times.
相关文章