How do short URLs services work?

前端 未结 4 486
半阙折子戏
半阙折子戏 2020-12-02 04:13

How do services like TinyURL or Metamark work?
Do they simply associate the tiny URL key with a [virtual?] web page which merely provide an \"HTTP redirect\" to the orig

4条回答
  •  北海茫月
    2020-12-02 04:32

    In simple words, URL shortener maps an arbitrary long sequence of character ( original, long crappy url ) into a short and slick sequence of characters. This is nothing but Hashing, which is most commonly used to create lookup tables, HashMap, md5 Hash for cryptographic purposes etc.

    To understand the URL-Shortening process I have created a demo project on GitHub and also a blog post. Do refer to this and let me know if it was helpful.

    Blog Post : URL Shortening

提交回复
热议问题