From time to time (usually at least twice a week) I’ll type in a web address and when it begins to connect at the top of the screen it will suddenly insert the the term %20 right in the middle of the address and I’ll be unable to connect to the site. It happens with all types of sites and browsers and is not specific to just my computer. Does this happen to other SDers and why does this happen?
If the url has a space in it, your browser will render it as %20. This happens when someone links a picture www.somewebsite.com/my crazy picture.jpg. 20 is the hex code for space.
Maybe when you are typing it, you don’t even realize that you automatically hit the spacebar between the words in the url. Nobody has a web address with a space in it. If you type http://www.straightdope.com it will translate to http://www.straight%20dope.com and not connect. Another common time to accidentally automatically hit the space bar is right after you type “.” because it’s a habit.
This is not strictly true. While you can’t have a domain name with a space in it, there are plenty of URLs with the “%20” string.
These are often images, where the file name of the image has a space in it. You can type the address into your browser with the space and still get the file:
Right. Which then can create a tricky situation if you do a “save as”, since depending on your software you may wind up with the actual characters “%20” in the middle of your saved filename
You’re seeing something called “URL encoding”. A URL, by the standard (http://www.ietf.org/rfc/rfc1738.txt), may contain only letters, numbers and a few special characters. Anything else, such as spaces or other special characters must be encoded as %nn.