什么是跨域(定义理解错误)
生活随笔
收集整理的這篇文章主要介紹了
什么是跨域(定义理解错误)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
什么是跨域
當(dāng)一個請求url的協(xié)議、域名、端口三者之間任意一個與當(dāng)前頁面url不同即為跨域
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
| 當(dāng)前頁面url? ? | 被請求頁面url? ? | 是否跨域? | ?原因 |
| http://www.test.com/ | http://www.test.com/index.html? | 否? | 同源(協(xié)議、域名、端口號相同) |
| http://www.test.com/? | ?https://www.test.com/index.html? | 跨域 | 協(xié)議不同(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) |
總結(jié)
以上是生活随笔為你收集整理的什么是跨域(定义理解错误)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: HTML DOM教程 36-HTML D
- 下一篇: NHibernate的关键点精要