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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

In search of the perfect URL

41 点作者 owksley超过 9 年前

10 条评论

mysterypie超过 9 年前
Xvideos uses the same technique to good effect as well. All of their videos links follow the format:<p>www xvideos com&#x2F;videoNNNNNNN&#x2F;description_of_activity_which_can_be_easily_updated (NSFW)<p>I wanted to mention a mystery concerning Xvideos. Here&#x27;s a business that is very much in-your-face (i.e. it is not a defense contractor or an organization that wants to be discreet), but its ownership is totally unknown.<p>I researched it. There are literally zero articles or information about who owns it. No interviews with the founders. Nothing. I haven&#x27;t been able to even figure out what country it&#x27;s based in.<p>Somewhere out there is a very rich person whose family and friends probably don&#x27;t realize that he founded a major Internet business.<p>Yes, a <i>major</i> Internet business: they have several million videos (far more than competing &quot;tube&quot; sites), hundreds or thousands of fast servers, and an Alexa rank of 47 which is higher than imdb.com and only a couple steps below microsoft.com.<p>But in this age of little privacy, they&#x27;ve managed to be super private.
评论 #10245936 未加载
评论 #10245940 未加载
评论 #10245651 未加载
评论 #10245719 未加载
lwf超过 9 年前
It also means you can trick people:<p><a href="http:&#x2F;&#x2F;www.amazon.com&#x2F;Intel-Quantum-Computing-Module&#x2F;dp&#x2F;B00186WR92" rel="nofollow">http:&#x2F;&#x2F;www.amazon.com&#x2F;Intel-Quantum-Computing-Module&#x2F;dp&#x2F;B001...</a>
评论 #10245414 未加载
评论 #10245488 未加载
X-Istence超过 9 年前
Stack overflow does this too:<p><a href="http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;32672492&#x2F;python-3-5-startswith-in-if-statement-not-working-as-intended" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;32672492&#x2F;python-3-5-start...</a><p>Is the same as:<p><a href="http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;32672492&#x2F;" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;32672492&#x2F;</a>
adventured超过 9 年前
I find it interesting the author mentions making an effort to remove the numeric ID from the URL.<p>I love using numeric IDs in the URL, for one specific reason: perma-short-link.<p><a href="http:&#x2F;&#x2F;qz.com&#x2F;365810&#x2F;whats-missing-from-this-13-year-old-girls-iphone-home-screen&#x2F;" rel="nofollow">http:&#x2F;&#x2F;qz.com&#x2F;365810&#x2F;whats-missing-from-this-13-year-old-gir...</a><p>Becomes:<p><a href="http:&#x2F;&#x2F;qz.com&#x2F;365810" rel="nofollow">http:&#x2F;&#x2F;qz.com&#x2F;365810</a><p>Which then redirects to the proper full url. Total effort: almost nil.
评论 #10246139 未加载
franze超过 9 年前
my battle-proven URL rules. important: rule 1 is more important then rule 2 to 6 added up, rule nr 2 is more important than rule 3 to 6 totaled, rule 3 is more important than 4 to 6 together, rule 4 is more important than 5 + 6, rule 5 and rule 6 are a tradeoff (it&#x27;s short, not shortest possible URL).<p>the targeted phrase is term(s) you want to get found for (i.e.: in google search)<p>URL-Rule 1: unique (1 URL == 1 resource, 1 resource == 1 URL)<p>URL-Rule 2: permanent (they do not change, no dependencies to anything)<p>URL-Rule 3: manageable (measurable, 1 logic per site section, no complicated exceptions, no exceptions)<p>URL-Rule 4: easily scalable logic<p>URL-Rule 5: short<p>URL-Rule 6: with a variation of the targeted phrase<p>most common mistake, rule 6 (least important) invalidates rule 1 (most important)<p>i stand with these url-rules, evertime you compromise on them - or change the priority in between the url-rules, you - your company&#x2F;startup&#x2F;business&#x2F;website&#x2F;webapp - will regret it in the longterm.<p>about: &gt;This is the sort of solution that I really like. The SEO folks can fiddle with the URL until the cows come home, the engineers have the luxury of a straightforward rule, and the user never sees a broken link. Is this simple structure enough to keep everybody happy?<p>NO<p>every redirect has a cost:<p>- server ressources<p>- (web)performance a.k.a. speed<p>- long term project costs: redirects needs to be maintained (they will not) and documented (they are not)<p>- added complexity (redirect complexity add up fast, more info see <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8891553" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8891553</a> )
评论 #10245800 未加载
ckluis超过 9 年前
I like this solution.<p>Essentially qz.com&#x2F;122345&#x2F;{anything-here} will redirect to the canonical url allowing for experimentation on the title of articles and urls.
thephyber超过 9 年前
I thought this was fairly common knowledge.<p>Using a DB PKID is a faster lookup than a text slug and uses much less storage space in the DB.<p>For SEO &#x2F; URL permanence reasons, the PKID is always the authoritative key while the slug can be updated to represent the current content of the URL.
jjsewell-ff超过 9 年前
When building content management systems, we&#x27;ve taken a approach similar to this to keep URLs constant when names of articles, posts, objects might get changed by an site admin. The first time I noticed this approach was Trello.<p>Here&#x27;s an example trello URL: <a href="https:&#x2F;&#x2F;trello.com&#x2F;x&#x2F;1234567&#x2F;203-make-the-buttons-bigger" rel="nofollow">https:&#x2F;&#x2F;trello.com&#x2F;x&#x2F;1234567&#x2F;203-make-the-buttons-bigger</a><p>If you change the name of the card, the ID (203) stays the same, but the friendly part of the URL stays the same. When directing you to the card, the system doesn&#x27;t care past the ID.
giancarlostoro超过 9 年前
Interestingly enough I think I tried the same thing when I saw a link from the same site. It is indeed a great workaround to the changing URL&#x27;s dilemma.
ambirex超过 9 年前
We have reversed it to be example.com&#x2F;seo-go-nuts&#x2F;%d&#x2F; to bring the text closer together.
评论 #10245757 未加载