Are there any reasons to not use a comma (, <- one of these fellas ;)) in a URL?
For example, http://domain.com/something/0,123,3.html ?
Sean
Are there any reasons to not use a comma (, <- one of these fellas ;)) in a URL?
For example, http://domain.com/something/0,123,3.html ?
Sean
Iāve never heard of a problem with commas, I personally wouldnāt use them because I donāt think theyāre a standard URL character.
I seem them on a lot of news/archived sites⦠doesnāt appear to be a problem, but as aspen said⦠you might as well need them⦠and surely you donāt NEED to use them.
Thanks both. Perhaps somebody cleverer than me can tell me what this has to say on the issue
Sean
Looks like a comma is okay according to that document ā I still wouldnāt use one though.
Any reasons apart from your previous post Chris?
Sean
They just seem like a good way to confuse visitors. I donāt think most people are used to typing commas in URLs.
Plus Iād rather have something thats keyword rich and
keyword,keyword,keyword would just look weird.
Try to do a domain search on GoDaddy.com. NetworkSolutions.com, etc. for a domain with a comma in it (For instance, I tried www.Tampa,FL.com) and theyāll tell you it is not proper syntax. Whether thatās right or wrong, itās hard to use a domain if you canāt register it!
Iām not sure how that might translate into using them for folder names or file names. Never tried it, and I agree that it would look strange. But then again, all of this looked strange at some point!
a comma in a domain name is VERY different from a comma in a filenameā¦
You can have commas in filenames, but you are very limited to the characters of a domain name
Thanks for the comments everybody. Iāll have to do some pondering
Sean
Sean,
I need to read it in deep but at a first glance here it said that the comma is a reserved character:
http://www.ietf.org/rfc/rfc2396.txt
2.2. Reserved Characters
Many URI include components consisting of or delimited by, certain
special characters. These characters are called āreservedā, since
their usage within the URI component is limited to their reserved
purpose. If the data for a URI component would conflict with the
reserved purpose, then the conflicting data must be escaped before
forming the URI.
reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
"$" | ","
The āreservedā syntax class above refers to those characters that are
allowed within a URI, but which may not be allowed within a
particular component of the generic URI syntax; they are used as
delimiters of the components described in Section 3.
Characters in the āreservedā set are not reserved in all contexts.
The set of characters actually reserved within any given URI
component is defined by that component. In general, a character is
reserved if the semantics of the URI changes if the character is
replaced with its escaped US-ASCII encoding.
2.3. Unreserved Characters
Data characters that are allowed in a URI but do not have a reserved
purpose are called unreserved. These include upper and lower case
letters, decimal digits, and a limited set of punctuation marks and
symbols.
unreserved = alphanum | mark
mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"
Unreserved characters can be escaped without changing the semantics
of the URI, but this should not be done unless the URI is being used
in a context that does not allow the unescaped character to appear.
The specification is not too much clear ( to me, no the spec itself ) on whatās that ``reserved purpose āā
But Iād not use the comma
andrea
Itās not very clear for me either Andrea!
Sean
Using commas in a URL is not the most compliant way to build your site navigation. At the very least, I would use the URL escape character (%2C) for a comma in the file name.
Best,
Jason
It would make sense to use a comma if you need to have a list of variables in a URL, for example for generating a graph on the server.
Iām facing the same problem,
Any one let me know using commaās in url are allowed are not. Do search engines read them?
<snip/>
I guess the confusion is due to using
URI Universal Resource Indentifier
URL Universal Resource Location
These are similar but NOT the same thing.
If you donāt know the difference you probably donāt need to worry about it much, but better yet, do a Search and read up a bit.
In a nutshell, If your link works it works.
This thread is very old, putting it to rest.