The Uniform Resource Locator or URL specifies a web address. The address can be either in words (for example: w3schools.com) or can be an IP (Internet Protocol) address. However, words are always easier to remember than numbers.
Syntax:
scheme://prefix.domain:port/path/filename
scheme://prefix.domain:port/path/filename
scheme://prefix.domain:port/path/filename
Parameters:
- scheme: It is used to specify the type of Internet services. For example, HTTP or https.
- prefix: It is used to specify a domain prefix. For example, www for HTTP.
- domain: It is used to specify the Internet domain name. For example, w3schools.com.
- port: It is used to specify the port number at the host. For example, the default port number for HTTP is 80.
- path: It is used to specify a path at the server. Otherwise, by default, the path is the root directory of the site.
- filename: It is used to specify the name of a file, document, or resource.
Types of schemes used in URL:
- HyperText Transfer Protocol or HTTP: Used for non-encrypted common web pages.
- Secure HyperText Transfer Protocol or HTTPS: Used for encrypted and secure web pages.
- File Transfer Protocol or FTP: Used for downloading or uploading files.
- FILE: Used for a file on a computer system.
URL Encoding:
Over the internet, a URL is sent by using the ASCII character set only, and for the characters in the URL that are not from the ASCII character set, the URL is converted, and this is where the URL encoding comes into role. The non-ASCII characters are thus replaced during URL encoding, with a “
ASCII Encoding Reference
URL encoding is done by the browser based on the character-set used in the web page. UTF-8 is the default character-set in HTML5.
Character |
From Windows-1252 |
From UTF-8 |
---|---|---|
space |
||
! |
||
“ |
||
# |
||
$ |
||
| ||
& |
||
‘ |
||
( |
||
) |
||
* |
||
+ |
||
, |
||
– |
||
. |
||
/ |
||
0 |
||
1 |
||
2 |
||
3 |
||
4 |
||
5 |
||
6 |
||
7 |
||
8 |
||
9 |
||
: |
||
; |
||
< |
||
= |
||
> |
||
? |
||
@ |
||
A |
||
B |
||
C |
||
D |
||
E |
||
F |
||
G |
||
H |
||
I |
||
J |
||
K |
||
L |
||
M |
||
N |
||
O |
||
P |
||
Q |
||
R |
||
S |
||
T |
||
U |
||
V |
||
W |
||
X |
||
Y |
||
Z |
||
[ |
||
\ |
||
] |
||
^ |
||
_ |
||
` |
||
a |
||
b |
||
c |
||
d |
||
e |
||
f |
||
g |
||
h |
||
i |
||
j |
||
k |
||
l |
||
m |
||
n |
||
o |
||
p |
||
q |
||
r |
||
s |
||
t |
||
u |
||
v |
||
w |
||
x |
||
y |
||
z |
||
{ |
||
| |
||
} |
||
~ |
||
` |
||
|
||
‚ |
||
ƒ |
||
„ |
||
… |
||
† |
||
‡ |
||
ˆ |
||
‰ |
||
Š |
||
‹ |
||
Œ |
||
|
||
Ž |
||
|
||
|
||
‘ |
||
’ |
||
“ |
||
” |
||
• |
||
– |
||
— |
||
˜ |
||
™ |
||
š |
||
› |
||
œ |
||
|
||
ž |
||
Ÿ |
||
¡ |
||
¢ |
||
£ |
||
¤ |
||
¥ |
||
¦ |
||
§ |
||
¨ |
||
© |
||
ª |
||
« |
||
¬ |
||
| ||
® |
||
¯ |
||
° |
||
± |
||
² |
||
³ |
||
´ |
||
µ |
||
¶ |
||
· |
||
¸ |
||
¹ |
||
º |
||
» |
||
¼ |
||
½ |
||
¾ |
||
¿ |
||
À |
||
Á |
||
 |
||
à |
||
Ä |
||
Å |
||
Æ |
||
Ç |
||
È |
||
É |
||
Ê |
||
Ë |
||
Ì |
||
Í |
||
Î |
||
Ï |
||
Ð |
||
Ñ |
||
Ò |
||
Ó |
||
Ô |
||
Õ |
||
Ö |
||
× |
||
Ø |
||
Ù |
||
Ú |
||
Û |
||
Ü |
||
Ý |
||
Þ |
||
ß |
||
à |
||
á |
||
â |
||
ã |
||
ä |
||
å |
||
æ |
||
ç |
||
è |
||
é |
||
ê |
||
ë |
||
ì |
||
í |
||
î |
||
ï |
||
ð |
||
ñ |
||
ò |
||
ó |
||
ô |
||
õ |
||
ö |
||
÷ |
||
ø |
||
ù |
||
ú |
||
û |
||
ü |
||
ý |
||
þ |
||
ÿ |
URL Encoding Reference
The