开发者_运维知识库
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this questionI've done some Googling trying to find out the origin of the word "slug" as used in URLs. However I can't seem to find any information on it. Does anyone know where this term came from?
- http://en.wikipedia.org/wiki/Slug_(web_publishing)
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.
精彩评论