Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why browsers encode url in this form?

Why browsers encode url in this form ?

From:

http://www.example.com 

to:

http%3A%2F%2Fwww.example.com
like image 739
xRobot Avatar asked Mar 21 '26 05:03

xRobot


1 Answers

URLs can only be sent over the Internet using the ASCII character-set.

Since URLs often contains characters outside the ASCII set, the URL has to be converted. URL encoding converts the URL into a valid ASCII format.

URL encoding replaces unsafe ASCII characters with "%" followed by two hexadecimal digits corresponding to the character values in the ISO-8859-1 character-set.

URLs cannot contain spaces. URL encoding normally replaces a space with a + sign.

You can read more here:

INTRODUCTION TO URL ENCODING / URL ENCODED STRINGS

like image 136
Sarfraz Avatar answered Mar 23 '26 18:03

Sarfraz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!