互联网与文化w3.org编辑精选
Cool URIs 不会改变(1998)
Cool URIs don't change (1998)
2012 — 2021,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这是 W3C 上 Tim Berners-Lee 于 1998 年撰写的经典短文,主张网站 URI 应当永久保持不变:改变 URI 会破坏他人的链接,而链接失效会让用户对网站失去信任。文中给出了设计稳定 URI 的具体建议,并收录了违反这一原则的“耻辱堂”。
为什么经久不衰:它提出的“URI 不应改变”是 Web 设计最基本也最常被违背的原则,二十多年后仍是每个开发者设计 URL 结构时绕不开的参考。
HN 评论精选
实践证明链接失效并不会像作者预言的那样让用户失去对网站的信任
回顾这篇文章写就后的二十多年,事实证明作者错了。网民经常遇到 404 或被重定向到首页,但并不会因此对网站失去信任。纽约时报旧文章或微软博客的失效链接并不会动摇公众对这些大公司的信心,链接腐烂只是被当作生活常态接受了。我 2013 年收藏的美国国债利率深链接到 2021 年已经失效,但这并不损害美国政府的公信力——人们直接用 Google 去搜就好了。
jasode查看英文原文
>When you change a URI on your server, you can never completely tell who will have links to the old URI. [...] When someone follows a link and it breaks, they generally lose confidence in the owner of the server. With 2+ decades to look back on after this was written, it turns out the author was wrong about this. Web surfers often get 404 errors or invalid deep links get automatically redirected to the main landing page -- and people do not lose confidence in the site owner. Broken links to old NYTimes articles or Microsoft blog posts don't shake the public's confidence in those well-known companies. Link rot caused by companies reorganizing their web content is just accepted as a fact of life. This was the 2013 deep link I had to USA Treasury rates: http://www.treasurydirect.gov/RI/OFNtebnd ... and the link is broken now in 2021. I don't think that broken link shakes the public's confidence in the US government. Instead, people just use Google/Bing to find it.
早期技术决策(如文件扩展名)和糟糕的软件设计让稳定 URL 在实践中难以实现
很多早期 Web 技术的失误让稳定 URL 变得不切实际。比如有人决定在 URL 中包含文件扩展名,导致每个链接都依赖于你任意的实现细节(.asp、.php 等);很多软件栈在设计 URL 时完全不动脑子,比如某企业缺陷跟踪系统连 server.net/123456 这样访问某 bug 的简单 URL 都没有,而是用长得离谱的 URL。我还收到过用十二个步骤教人如何到达某个网页文件的邮件——简单、描述性强且稳定的 URL 这一概念在这些系统里完全丢失了。
dang查看英文原文
Past related threads: Cool URIs Don't Change (1998) - https://news.ycombinator.com/item?id=23865484 - July 2020 (154 comments) Cool URIs Don't Change - https://news.ycombinator.com/item?id=21720496 - Dec 2019 (2 comments) Cool URIs don't change. (1998) - https://news.ycombinator.com/item?id=21151174 - Oct 2019 (1 comment) Cool URIs don't change (1998) - https://news.ycombinator.com/item?id=11712449 - May 2016 (122 comments) Cool URIs don't change. - https://news.ycombinator.com/item?id=4154927 - June 2012 (84 comments) Tim Berners-Lee: Cool URIs don't change (1998) - https://news.ycombinator.com/item?id=2492566 - April 2011 (25 comments) Cool URIs Don't Change - https://news.ycombinator.com/item?id=1472611 - June 2010 (1 comment) Cool URIs Don't change - https://news.ycombinator.com/item?id=175199 - April 2008 (9 comments)
澄清 URI、URL、URN 的概念区别:URL 和 URN 都是 URI 的子集,但功能上并不等同
很多人搞不清楚,但 URL、URN 和 URI 在功能上并不可互换。每个 URN 和 URL 都是 URI,但反过来不成立。URN 有特定的 scheme,但不包含如何访问资源的信息;URL 则不仅是标识符,还包含如何找到并访问该资源的指令,例如 http://example.org/foo.html 指明用 HTTP 协议连接到 example.org 解析出的 IP 地址的 80 端口。还有允许国际字符集的 IRI。
Communitivity查看英文原文
It is confusing to a lot of people, but they aren't functionally interchangeable. Basically you have Uniform Resource Locators (URLs), Uniform Resource Names (URNs), and Uniform Resource Identifiers (URIs). You also have International Resource Identifiers (IRIs), which are URIs with rules allowing for international character sets in things like host names. Every URN and URL is a URI. However, not every URI is a URN, or a URL. A URN has a specific scheme (the front part of a URI before the :), but it does not contain instructions on how to access the identified resource. We humans might automatically map that to an access method in our head (e.g., digital object identifier URNs like doi:10.1000/182, which we who have used DOIs know maps to http://dx.doi.org/10.1000/182), but the instruction isn't in the URN. A URL is not just an identifier but also an instruction for how to find and access the identified resource. For example http://example.org/foo.html says to access the web resource /foo.html by using the HTTP protocol over TCP to connect to IP address which example.org resolves to, on port 80. An example of URIs which are not URLs are the MIME content ids used to mark the boundaries within an email (cid scheme), e.g., cid:foo4%25foo1@bar.net. You can get more information at: https://tools.ietf.org/html/rfc2392
如今平台故意改变 URL 以强制用户经过其入口,与文章倡导的原则背道而驰
啊,九十年代的数字天真。如今“酷 URL”反而是被故意改掉的,这样你就必须从前门(平台首页)进入,而不是直接跳到目的地。
osobo查看英文原文
Ah, the digital naiveté of the nineties. Nowadays, cool URLS get changed on purpose so you have to enter the platform through the front instead of bouncing off your destination.
历次讨论
同类还值得读
如今电脑上几乎所有操作在感知上都比 1983 年更慢(2017)
Almost everything on computers is perceptually slower than it was in 1983 (2017)
2017 年的推文串认为,尽管计算机硬件比 1983 年快得多,日常操作的感知速度却常常更慢:启动、界面响应和网络应用被层层抽象、动画、后台检查与网络依赖拖累。
互联网与文化上首页 5 次 · 2017–2020twitter.com网站肥胖危机
The Website Obesity Crisis
Maciej Cegłowski(idlewords)的经典演讲文稿《网站肥胖症危机》,批评现代网页越来越臃肿:动辄数 MB 的 JavaScript、追踪脚本和广告,把本可以轻…
互联网与文化上首页 5 次 · 2016–2021idlewords.com编辑精选亚马逊那本标价 23,698,655.93 美元的苍蝇书
Amazon’s $23,698,655.93 book about flies
博文讲的是亚马逊上一本关于果蝇的二手书被标到 23,698,655.93 美元。
互联网与文化上首页 5 次 · 2011–2022michaeleisen.org浏览器 User-Agent 字符串的历史
History of the browser user-agent string (2008)
2008 年的经典文章用戏谑的“创世纪”口吻,讲述浏览器 User-Agent 字符串如何从简单的标识演变成层层叠加的伪装:浏览器为了绕过按 UA 分发的网站检测,纷纷把自己伪装…
互联网与文化上首页 5 次 · 2012–2022webaim.org编辑精选最后的问题——艾萨克·阿西莫夫
The Last Question - Isaac Asimov
阿西莫夫最著名的短篇科幻小说《最后的问题》的在线全文。
互联网与文化上首页 5 次 · 2009–2019multivax.com编辑精选