开发者

jQuery .load() Access-Control-Allow-Origin

开发者_如何学编程I am trying to load site content in to a div using jQuery .load() and am getting problems with Access-Control-Allow-Origin, the script thinks I am trying to do a cross domain load but everything is on the same server.

The content I am trying to load is from the same site but because of the way to domains are set up problems are occurring, specifically when the domain is accessed as http://<domain> load request works, however when the domain is accessed as http://www.<domain> I get the Access-Control issue.

I would like to know how I can solve this as everything is on the same server and same website.


the solution for your problem is: easyxdm

easyXDM is a Javascript library that enables you as a developer to easily work around the limitation set in place by the Same Origin Policy, in turn making it easy to communicate and expose javascript API’s across domain boundaries.

At least...it solved a lot of troubles and concerns at our server(s) (with many different domains)...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜