views:

24

answers:

1

in some of the websites i have, when adding to favorite with IE button the name of the favorite that is auto filled in by the page title is sometimes not getting the name and insted it gets the url where the "/" is replaced by "-" and ":" is removed

what is the problem? the websites are hebrew or english, encoding is utf-8 or windows-1255...

A: 

IE favorites are just files, specifically .url files. It is illegal, on Windows, to have a filename with certain characters in it. This includes the / and : characters. IE replaces them with a - rather than bothering the user about it.

The full list of illegal characters is: \ / : * ? " < > |

Only someone with the source code or more specific knowledge of IE than I can tell you the exact reason why it's not working for you. However, on your example page, you have a really long title: it's 396 characters long. MAX_PATH on Windows is 260 characters. My guess is that IE is falling into some error condition because your title is longer than anyone would reasonably expect a title to be (after all, the tab UI can only show about 50 characters). Since your title is too long, it's using the URL. Try shortening your title and see if that fixes the problem.

Update: I just ran a little experiment and it seems IE limits you to 128 characters (which means someone picked an arbitrary power of two and now you're stuck with it). Anything longer than 128 and IE uses the URL instead of the title.

You can also try using window.external.AddFavorite() in IE; I don't know how long of a title that will let you specify, but I suspect you'll always be limited to MAX_PATH.

jeffamaphone
on explorer when you add to favorite (try it) you will see a popup window with a name filed that gets the page title...in some of my websites, some of the pages doesn't get the title as the favorite auto naming and it gets the url with the ignoring of the illegal characterswhy is that happening?
Y.G.J
I don't know why that's happening, and my psychic powers are weak this morning due to lack of coffee. Can you provide a link to a page the reproduces the problem?
jeffamaphone
there you go, linkhttp://www.yuvalyosef.com/english/site/Yuval-Yosef-Photographer.aspif you do CTRL+D the add to favorite popup opens and you get the url and not title page there
Y.G.J
I've updated my answer.
jeffamaphone
get... probebly this is it... wonder why there is nothing about it in Microsoft MSDN or forums or over the internet
Y.G.J
I dunno. MSDN is written by tech writers, not by the developers. There are a lot of juicy details that get lost in translation.
jeffamaphone