Question

Can XMLHttpRequest send a request to http:// mydomain.com:81/ from http:// mydomain.com/ ?

Was it helpful?

Solution

For two documents to be considered to have the same origin, the protocol (http/https), the domain and the port (the default 80 or :xx) have to be indentical. So no, you cannot use xhr against a different port.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top