Cross domain Ajax request from within js file

后端 未结 7 2086
清酒与你
清酒与你 2020-11-30 10:17

Here\'s the problem:

1.) We have page here... www.blah.com/mypage.html

2.) That page requests a js file www.foo.com like this...



        
7条回答
  •  执笔经年
    2020-11-30 11:10

    There is a w3c proposal for allowing sites to specify other sites which are allowed to make cross site queries to them. (Wikipedia might want to allow all request for articles, say, but google mail wouldn't want to allow requests - since this might allow any website open when you are logged into google mail to read your mail).

    This might be available at some point in the future.

提交回复
热议问题