什么是跨域???


什么是跨域?

当一个请求url的 协议、域名、端口三者之间任意一个与当前页面url不同即为跨域。


当前页面url              被请求页面url               是否跨域            原因
http://www.test.com/     http://www.test.com/index.html     否       同源(协议、域名、端口号相同)
http://www.test.com/     https://www.test.com/index.html  跨域       协议不同(http/https)
http://www.test.com/     http://www.baidu.com/       跨域                    主域名不同(test/baidu)
http://www.test.com/     http://blog.test.com/        跨域                    子域名不同(www/blog)
http://www.test.com:8080/    http://www.test.com:7001/      跨域                    端口号不同(8080/7001)


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM