How to call external url in jquery?

前端 未结 7 1673
再見小時候
再見小時候 2020-11-28 10:44

I am trying to put comments on Facebook wall using jquery.

But my ajax call not alowing external url .

can anyone explain how can we use external url with jq

7条回答
  •  野性不改
    2020-11-28 10:57

    google the javascript same origin policy

    in a nutshell, the url you are trying to use must have the same root and protocol. so http://yoursite.com cannot access https://yoursite.com or http://anothersite.com

    is you absolutely MUST bypass this protection (which is at the browser level, as galimy pointed out), consider the ProxyPass module for your favorite web server.

提交回复
热议问题