Search code examples
url-encoding

Why we should URL encoding?


URLs can only be sent over the Internet using the ASCII character-set. Since URLs often contain characters outside the ASCII set, the URL has to be converted into a valid ASCII format.

Why URLs contain the only ASCII set, Why URLs should be encoded ?


Solution

  • Why URLs contain the only ASCII set?

    Otherwise, you would need a different naming standard for systems that aren't 8-bit clean. At the time the URL standard was developed, that wasn't terribly uncommon. Remember, URLs are not specific to the Internet. They're supposed to be a universal naming standard.

    Why URLs should be encoded ?

    Otherwise you won't get the resource you're looking for. If you decide that "no" means yes and "yes" means no, nobody will understand what you're talking about. That's why we have standards.