Understanding how URI is created in medium

Sandeep
Jan 3, 2021

--

When User is about to create a new story medium redirects to /new-story then a uid is returned and the the user is shown the uri => /p/uid/edit

Now once the User gives the title name and add some content to the body and publishes a static uri is created by appending the title and the uid separated by dash ( -) .

So for example if the title is “my first title” and the id is 98f535ad899e then the uri you will see is my-first-title-98f535ad899e in the url.

After that you can change the title in the page but the uri never changes :) clever technique is used here ! Why I mentioned this ? Thats how you can build your blog platform REST apis :)

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Sandeep
Sandeep

Written by Sandeep

Passionate Software Engineer, Mentor at interviewdose.com and a Bot Trader

No responses yet

Write a response