Whenever I go to YouTube or any website at all, it doesn’t matter if I write the website name in lowercase letters or uppercase letters, I will land on the same website. But whenever we go to a video and even replace 1 letter with lowercase or uppercase, the link doesn’t work.
How does the URL know that one section is not case-sensitive while the other section is case-sensitive?
I can understand why that’s the case. To keep the URLs unique. just in case something similar comes up. But what’s happening behind the scenes?
In: 52
Domain is not case sensitive. (The www.website.com part). This is for your safety because if Amazon owned www.amazon.com and some malicious entity owned www.Amazon.com they could make there website look exactly like Amazon and just steal your credit card information.
The part after the / is data sent to the server. The part before the ? Is the path and the part after is the parameter.
Example url
youtube.com/watch?v=dQw4w9WgXcQ
Watch is the path. Basically tells the server where you are and what you are doing. In this case you are trying to watch a video. There is not a great reason to have this case sensitive other than it’s more work for the developer to deal with both upper and lower case paths. However the important part is that if you mess up you are still requesting data from youtube so it’s not a safety concern.
The path after the ? v=dQw4w9WgXcQ. Is basically saying v( a variable that probably means video) is dQw4w9WgXcQ. This random string of letter is the unique identifier for the video and having it be case sensitive is very important because it allows youtube to have MUCH more possible unique identifiers to assign.
Latest Answers