Are different ports on the same server considered cross-domain? (Ajax-wise)

XMLHttpRequest 能否从 http://mydomain.example/http://mydomain.example:81/发送请求?

28657 次浏览

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. 因此,不能对不同的端口使用 xhr。