Cross-site AJAX using jQuery

后端 未结 3 1746
野趣味
野趣味 2020-12-03 12:52

I have an existing jQuery plugin which makes a lot of AJAX calls (mostly JSON). I am wondering what is the quickest to allow it to do cross-site calls i.e. the $.get and $.p

3条回答
  •  旧巷少年郎
    2020-12-03 13:28

    You can also use CORS instead of JSONP, works with ff,chrome,safari. CORS is less troublesome to setup and requires only a filter in server-side.

    Please go through this article.Well explained and similar. Only constraint is IE does not support this and older versions of FF,chrome also has some issues.

    http://techblog.constantcontact.com/software-development/using-cors-for-cross-domain-ajax-requests/

提交回复
热议问题