Forum Moderators: open

Message Too Old, No Replies

Is the "+" equal to "space"?

         

fischermx

7:13 am on Mar 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have an application that log referrals.
I saw in this log some referral from a site that looked like : http://www.example.com/cool%20article.html in the logs.
When I visited the referrer site I saw the URL really was: http://www.example.com/cool+article.html

Now, if I type in the browser:
http://www.example.com/cool article.html (with a space)

The browser converts it to %20, too.

So, are these equivalent!?

phranque

7:36 am on Mar 5, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



the "%20" is the "url encoding" of a space which is ascii decimal character 32 or 20 in hexadecimal.
the plus sign is reserved as shorthand notation for a space within the query string of a url, so real plus signs must be encoded.