0

Is a request from http://domain.tld:80 to http://localhost:8080 cross domain or it is proper and normal?

I've read about cross domain ajax requests are different to handle than normal ajax requests. That is why I am asking this question.

user1757703
  • 2,503
  • 4
  • 35
  • 56

2 Answers2

1

I believe browser will treat the Ajax URL(http://localhost:8080) as the cross domain and restricts the response. If you can't avoid it, you should look at the JSONP to handle the response from the cross domain Ajax Request.

You can find more details about Jsonp here

Check this if you can find some more clue here

Community
  • 1
  • 1
prabeen giri
  • 753
  • 6
  • 18
0

Yes. That is cross domain. To my understanding as long as there are different domains involved (domain.tld and localhost), you will encounter these issues. Try https://learn.jquery.com/ajax/working-with-jsonp/

Sthe
  • 2,388
  • 2
  • 27
  • 45