Have you notice something like this in your url. It sometimes look like this 👇
https : //x.com/Kunalmadoliya
Enter fullscreen mode
Exit fullscreen mode
and sometimes like this 👇
https : //www.x.com/in/kunal-madoliya-0378133b4/?skipRedirect=true
Enter fullscreen mode
Exit fullscreen mode
Technically there are no difference in both. What is the advantage of one is disadvantage for the other
In this blog topic to cover :
What URL parameters are
What query parameters are
Differences between them
When to use params vs query
URL / Path parameters
We use URL parameter to access a specific resource on the server. For example if you want to find a user by ID.
We can simply implement this simple code with a URL parameter
app . get ( " /:username " , ( req , res ) => { res . send ( req . params .…