4

Url And Http203 | news view

 3 years ago
source link: https://zsqk.github.io/news/2020-04-13-url-and-http203.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

news view

URL 与跨域

URL 和 URI 有什么区别

根据 URL 的 wiki, URL 是一种特殊的 URI, 用来表示互联网资源.

URL 的标准是什么

标准由 WHATWG 制定: https://url.spec.whatwg.org/

标准是抽象的, 并且引用套引用, 就像一个包含无数小函数的程序, 需要梳理.

我们来看看 MDN 的文档吧, What is a URL?

在 UTF-8 的现在, 多语言不是问题, 而是大家的守则. 理论上任何语言都可以成为构成 URL 的 valid domainpercent-encoded byte.

但是我们倾向于使用这样的规则: 小写字母, 数字, 连字符.

谈谈跨域 HTTP 203

HTTP 203 挺好的, 就是说话太快了, 来不及听.

https://www.youtube.com/watch?v=vfAHa5GBLio 提到:

  • 跨域请求问题来源于历史上 Cookies 会被一同发送.
  • Access-Control-Allow-Origin 比 Origin 还有历史.
  • 之所有会有 Origin 是因为历史上避免包含 - 的头被过滤.
  • 但现在 Origin 会有更广泛的作用.

如果网页不使用 Cookies, 似乎就不是什么问题了.

在现在前端当中, Cookies 的功能已经可以完全被替代了.

但可以被取代, 不是会被取代.

This site is open source. Improve this page.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK