On 1/17/2013 9:24 AM, Ben Bacarisse wrote:> j <> writes:
> <snip>
>> That still leaves open the question of what to replace the "-" with in
>> product name URLs. For the moment, I am just forbidding their
>> usage. Although -dash- is looking tempting.
>
> My gut reaction is to leave it alone. If it occurs in the middle of
> product name, you'd get sensible-looking URLs. For a product called
> "foo-bar":
Lets say we have a product called Foo Bar, and another called Foo-Bar.
If you replace a space with a "-" when you make the URL, then both wind
up as Foo-Bar.
Although that is unlikely, it becomes impossible to tell whether
/product/Foo-Bar
refers to Foo Bar or Foo-Bar
As it turns out there are other characters that are common in product
names that raise havoc in URLs. "/" and "&" being the worst.
There seems to be some standardization toward using a dash as the word
separator, Google encourages it. For those of us who have been writing
html for some time, there is an appreciation for standards, even defacto
standards.
Curiously some of the cargo cult complainers also complained about not
having a Doc Type back in the days (90's or so) when Doc Types had no
impact on page rendering.
Even for someone like myself who has no natural tendencies to follow the
heard, I see the value in using a "-". Google (and the other search
engines) have changed the way they rank pages more than once.
Jeff
>
> foo-bar-details.html
> foo-bar-summary.html
>
> One case for writing it as "dash" might be if the product name uses the
> character literally: for example, a smilie t-shirt with product name
> "t-shirt
". Here, the two uses of "-" are different. The first I'd
> leave alone, but the second might be rendered as a word:
>
> t-shirt-colon-dash-close-bracket-details.html
>
> but
>
> t-shirt-smiley-details.html
>
> is probably better overall. And there might considerations that apply
> specifically in your product area. Do your customers (and others) talk
> about the "dash x" and the "dash y" versions of a product, for example?
> If so, there might be an argument for translating it into a word in the
> URL.
>
> I think the best answer depends on the role that the "-" plays in the
> product name and it's hard to come up with a general answer.
>