Search code examples
urlterminologyslug

How did the term "slug" (as in URLs) originate?


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?


Solution

  • 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.