DITA and XMetaL Discussion

  • kwag_myers

    Favicons in WebHelp

    Participants 8
    Replies 9
    Last Activity 10 years, 9 months ago

    In Firefox 8, a missing favicon is substituted with a blank box, which doesn't make for a good impression. So, I'm attempting to add favicons to my web help with marginal success. I'm using the following syntax in the header of the index.html:

    The favicon displays on the Bookmark menu/tool bar, but not the tab or address bar. So, obviously, I'm missing a step in the process. Please advise.

    Reply

    Derek Read

    Reply to: Favicons in WebHelp

    Googling “firefox 8 favicon” gives me this page:

    “favicons broken in Firefox 8”
    http://forums.mozillazine.org/viewtopic.php?f=38&t=2357579

    Reply

    kwag_myers

    Reply to: Favicons in WebHelp

    Thanks Derek, but this thread seems to deal with missing favicons. I want to know how to add the favicon supplied by my client so that it displays in the tab and address bar like it does in the client's product. Sorry if my first post was misleading.

    Reply

    Derek Read

    Reply to: Favicons in WebHelp

    If you are asking how to change the HTML the DITA OT creates so that it adds your into the section of your HTML files you can add anything in there using the “HDF” setting and pointing it to a file containing the HTML to add. We expose that option in the Configure Output dialog. See attached image.

    Reply

    kwag_myers

    Reply to: Favicons in WebHelp

    Not working. Yesterday I had two JS programmers working on it and they are stumped too. And this is not just a Firefox issue, I can't get the favicon to display in IE or Chrome either.

    What's really frustrating is that the favicon displays in the address bar as the page is loading, but then reverts to the blank box. The only way I can get this to work is to force a download of the image with a script. The problem there is the image displays in the body, not the web help.

    Reply

    Derek Read

    Reply to: Favicons in WebHelp

    So this isn't a DITA OT issue (or WebHelp generation issue) then, as it is fully capable of putting anything you like into the section of the HTML (using the setting previously noted).

    Things to check (gathered from what Google thinks are the top 10 of apparently hundreds of thousands of pages on this topic):

    Some browsers only support favicon in one format, though some support others (PNG, GIF, ICO).
    Some browsers only support certain flavours of these image types (the ICO format in particular seems to be easily messed up by some image creation software).
    A browser running on different operating systems (Windows vs Mac in particular) may behave differently.
    Some browsers only support the favicon when it is served from a web server, not from your local machine.
    Some browsers only support the favicon when it is located in the root folder of your web server, they do not support specific paths to these files.
    Different versions of the same browser have varying support for this feature (as with all other browser features).

    The whole business of the favicon was invented for IE with no official spec and then adopted ad-hoc by other browser makers so there's no official rules for this. This is possibly the only thing that comes close: http://www.w3.org/2005/10/howto-favicon
    It might help a little bit but obviously not for any browser that hasn't read and implemented support along those lines.

    This might help too if you haven't seen it: http://en.wikipedia.org/wiki/Favicon (there are 36 links to references at the bottom of that page as well)

    Reply

    Derek Read

    Reply to: Favicons in WebHelp

    It sounds like this was included by the W3C in the HTML 4.01 recommendation, though I haven't yet been able to locate the part of the recommendation that discusses it. Probably still doesn't really help if browsers implement support for it differently, unless you just want to stick to the standard and ignore browsers that don't.

    Reply

    kwag_myers

    Reply to: Favicons in WebHelp

    Some browsers only support the favicon when it is served from a web server, not from your local machine.

    This seems to be the issue I'm having. I uploaded to a test server and both IE and Chrome display the favicon in the tab. Chrome doesn't seem to support the favicon in the address bar, but IE does and it's working there, too.

    As for Firefox, I've read that favicons often show up after the user loads the page several times. There's not much more I can do for FF users. Judging from all the “Missing favicon” threads, I'll be watching for FF9's release to see what changes Mozilla makes in support of favicons.

    Thanks for all the research!

    Reply

    kenfesta

    Reply to: Favicons in WebHelp

    Hi Derek,

    I wanted to try the approach you suggested, but I'm a little confused about MyOwnHTMLHeadStuff.txt

    What does that file look like?

    I can just put in any html that is relevant to a header section?

    thanks

    Reply

    Derek Read

    Reply to: Favicons in WebHelp

    The DITA OT documents this. The parameters when dealing with the DITA OT directly are: ftr, hdf, and hdr (corresponding to the settings that we provide in our dialog with similar names).

    See:
    http://dita-ot.sourceforge.net/1.5.4/readme/dita-ot_ant_properties.html

    Unfortunately I think that documentation is a bit misleading as it states “well-formed XML file”. While that is technically true, it isn't very specific. What this file should really usually contain is XHTML that will be valid where it is inserted.

    FTR is inserted at the end of the element in the XHTML, before the closing tag.
    HDF is inserted at the end of the element in the XHTML, before the closing tag.
    HDR is inserted at the start of the element in the XHTML, after the opening tag.

    [code=FTR Example]
     

    [/code]

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support