問題描述
在 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.
這篇關于在 Firefox 上,CORS 請求給出錯誤“:"(冒號)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!