This is what I've heard (from a somewhat reliable source):
Slugs are slow-moving gastropods. When you call someone a slug, you're calling them lazy - it's not a compliment. When you use human-readable terms in a URL instead of a database number or some other form, it's usually only for convenience; you can name URLs virtually anything you want, and so naming them using English words is mostly for readability. It supposedly originated when programmers became too "lazy" to look up a proper code or ID for a website, and began naming them using words. Those "lazy URLs" became slugs.
Again, I'm not sure if this is 100% correct, but it's what I've heard!
发布评论
评论(1)
这是我听到的(从比较可靠的来源):
蛞蝓是移动缓慢的腹足动物。当你称某人为鼻涕虫时,你是在称他们懒惰——这不是一种恭维。当您在 URL 中使用人类可读的术语而不是数据库编号或其他形式时,通常只是为了方便;您几乎可以为 URL 命名任何您想要的名称,因此使用英文单词命名主要是为了便于阅读。据推测,它起源于程序员变得太“懒”而无法查找网站的正确代码或 ID,并开始使用单词命名它们。那些“惰性 URL”变成了 slugs。
再说一次,我不确定这是否100%正确,但这是我所听到的!
希望这有帮助!
NS
This is what I've heard (from a somewhat reliable source):
Slugs are slow-moving gastropods. When you call someone a slug, you're calling them lazy - it's not a compliment. When you use human-readable terms in a URL instead of a database number or some other form, it's usually only for convenience; you can name URLs virtually anything you want, and so naming them using English words is mostly for readability. It supposedly originated when programmers became too "lazy" to look up a proper code or ID for a website, and began naming them using words. Those "lazy URLs" became slugs.
Again, I'm not sure if this is 100% correct, but it's what I've heard!
Hope this helps!
N.S.