TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: It Was Better with Www

1 点作者 justo-rivera超过 1 年前
We all act like writing www. is lame and for dads&#x2F;grandparents, but the truth is:<p>1. you never know when you need to write https:&#x2F;&#x2F;<p>2. it looks a lot uglier<p>3. literally means &quot;hypertext transfer protocol (secure)&quot; (I had to look it up, and i am a hacker news user.)<p>4. just happened to me: in a youtube description you cant just put ycombinator.com, you have to write https:&#x2F;&#x2F;ycombinator.com. This is not a problem if We Write World Wide Web When We Want to link to a Website

5 条评论

valrix超过 1 年前
1. If the website is correctly using HSTS, the new HTTPS DNS record, or redirecting from HTTP to HTTPS manually with a 301 then you don&#x27;t even need to specify a protocol. Just put in domain.TLD and go. 2. ??? 3. Yes, it&#x27;s the protocol definition and that&#x27;s what it means, correct. 4. Without the protocol, it&#x27;s not a URL. The specification of a valid URL can be read here <a href="https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;html&#x2F;rfc1738" rel="nofollow">https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;html&#x2F;rfc1738</a> where it points out that a &quot;scheme&quot; (the protocol, such as &quot;http&quot; or &quot;http&quot; or &quot;ftp&quot;) is required.<p>The problem is your examples assume you&#x27;re talking about ONLY a web server, when you can put ftp:&#x2F;&#x2F; or ssh:&#x2F;&#x2F; or even gopher:&#x2F;&#x2F; in front of ycombinator.com and the connection process will be vastly different, as they are different schemes of communication. Websites will always require a valid protocol before the domain because otherwise there&#x27;s no way to know for sure where the link is <i>meant</i> to go.
pwg超过 1 年前
&gt; you never know when you need to write <a href="https:&#x2F;&#x2F;" rel="nofollow">https:&#x2F;&#x2F;</a><p>It is not a proper URL without the protocol part up front. Browser creators improperly trying to hide the protocol not-withstanding.<p>&gt; just happened to me: in a youtube description you cant just put ycombinator.com,<p>ycombinator.com is not technically a URL, it is simply a domain name. The fact that browsers all invisibly &#x27;auto convert&#x27; it to a URL when entered into their URL&#x2F;magic bars does not magically make it into a url. If youtube&#x27;s code which is looking for URL&#x27;s to automatically make them anchor links simply looked for words with dots, then a large amount of false positives would occur (things that are not URL&#x27;s getting wrapped in anchor links).<p>You can blame the browser makers, and the evil one specifically, for all the hiding of URL structure such that people now think &quot;ycombinator.com&quot; should be interpreted as if it were a URL everywhere.
cranberryturkey超过 1 年前
i support all 4. http&#x2F;https www&#x2F;domain -- i redirect everything to <a href="https:&#x2F;&#x2F;domain" rel="nofollow">https:&#x2F;&#x2F;domain</a>
justo-rivera超过 1 年前
For subdomains:<p>www.news.ycombinator.com<p>www just means &quot;website&quot;
anigbrowl超过 1 年前
<a href="https:&#x2F;&#x2F;www.yourdomain.com" rel="nofollow">https:&#x2F;&#x2F;www.yourdomain.com</a><p>I don&#x27;t think you understand what a URL is, it&#x27;s more than just the address. Ftp:&#x2F;&#x2F;ftp.yourdomain.com and many others, for example.<p>However you do raise a worthwhile point in that browsers are overfitted for HTML when they were originally intended to be universal network interfaces.