Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Can we make Ajax request to a different instance of server(different port) running on the same machine

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
724 views
Welcome To Ask or Share your Answers For Others

1 Answer

Different port means different domain for the browser. So you will hit the cross-domain barrier.

Like Stuart said, you could try using JSONP.

If you are using jQuery, I'd recommend http://code.google.com/p/jquery-jsonp/ if you want it to be as painless as possible.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...