In this topic, we described about the URL Encode in detail.
URL stands for Uniform Resource Locator. URL is nothing but a web address. A URL can be composed of words or an Internet Protocol address. Web browsers used to request the web pages from web servers by using URL.
- scheme - The type of Internet service. http or https are the schemes.
- prefix - A domain prefix. Default for http is www.
- domain - The Internet domain name.
- port - The port number at the host. Default for http is 80.
- path - A path at the server. If omitted, it will point to the root directory.
- filename - The name of a document or resource.
URL Encoding is a process of converting unprintable or special characters within URL to a universally accepted representation by the browsers and servers. The characters are
- ASCII characters
- Non-ASCII control characters
- Reserved characters
- Unsafe characters
ASCII characters -
The characters are unprintable. Characters are ranging from 0-31 (decimal) and 127(decimal).
Non-ASCII characters -
These characters are by definition not legal. They are not part of ASCII character set. Characters are ranging from 128-255(decimal).
Reserved characters -
These characters are reserved for URL in general for the URL syntax. Normally these characters used for their special role. If these characters are not used for their special role, they need to be encoded.
Unsafe characters -
These characters presence possibly misunderstood within URL for any reason. These characters always be encoded.
For full set of URL encode characters, refer HTML URL Encode reference .