开发者

Who blocks cross domain AJAX request browser or webserver or both?

开发者 https://www.devze.com 2023-03-15 18:12 出处:网络
Cross domain AJAX requests are reported as \"aborted\" in firebug. I know this is supposed to besecurity feature but where exactly these requests get rejected ? At the browser end or at the server end

Cross domain AJAX requests are reported as "aborted" in firebug. I know this is supposed to be security feature but where exactly these requests get rejected ? At the browser end or at the server end ? 开发者_Python百科


Browser - they don't get sent at all. If you check your HTTP traffic (e.g. using Fiddler), you'll see that there is no corresponding HTTP request initiated for those aborted AJAX requests.

(That is also the only place where such blocking makes sense, as the server doesn't have a reliable way to distinguish between AJAX requests and normal requests; only the browser has enough context to make such decision.)

0

精彩评论

暂无评论...
验证码 换一张
取 消