I'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?
Asked
Active
Viewed 6,728 times
10
-
1I think this belongs on http://english.stackexchange.com/. – Jul 19 '11 at 16:05
-
2Not a programming questions, and I agree with @WTP, it belongs somewhere else. But the short answer is, it's a term borrowed from newspaper/print production. See: http://en.wikipedia.org/wiki/Slug_(production) – Intelekshual Jul 19 '11 at 16:11
-
I also think it belongs elsewhere (go figure) but SO is about the closest I could think of. =/ – Jake Petroules Jul 19 '11 at 17:27
-
2This is definitely a programming question. Terminology is important. I really don't understand why this was closed. – Glyph Jul 08 '12 at 22:49
1 Answers
13
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.

Jonathan Pitre
- 2,355
- 3
- 22
- 38
-
2While all of this appears to be folk etymology (I'd love to see sources), http://stackoverflow.com/a/4230937/122764 sounds more conclusive to me. – Cornelius Jan 30 '17 at 13:13
-
answer is not correct. It's originates from the publishing industry: In newspaper editing, a slug is a short name given to an article that is in production. The story is labeled with its slug as it makes its way from the reporter through the editorial process. The AP Stylebook prescribes its use by wire reporters (in a "keyword slugline") as follows: "The keyword or slug (sometimes more than one word) clearly indicates the content of the story." (Wikipedia) – ChatGPT Oct 06 '21 at 06:37