6

I can embed graphics in an HTML report with an img having a src attribute = "data:image/png;base64,base64_encoded_characters_go_here".

It works fine in all the browsers I've tested.

The last hurdle, so far, is to embed the encoded favicon.ico file inside the HTML report so that the browser doesn't have to perform a GET.

So far, the best solution I have is one which requires the favicon to appear publicly on our web site. But that doesn't completely handle the self-contained goal we stated. This solution requires me to specify a "shortcut icon" link and if that truly is the only way to do, then so be it. But I'd like to know for sure. I just don't want to have a directory full of version-controlled favicon%d.ico files.

Background...

I have an XML => XSLT => HTML desktop application that produces HTML reports that can be self-contained and shared, say, via email attachments. The self-contained nature is useful for resolving a lot of version control problems that I don't want to solve. I have, in fact, solved most of them.

The goal, of course, in making self-contained reports is that the recipient's browser need perform no GETs. So, stylesheets and most graphics are embedded/encoded in the HTML page without significantly increasing the HTML report's size.

I say all this to head off a lot of obvious questions about why I even want to do this. But keep in mind, this is not a web site, it is simply a report generator.

L84
  • 45,514
  • 58
  • 177
  • 257
Jeff Holt
  • 2,940
  • 3
  • 22
  • 29
  • 1
    @o.v. After reading the link and testing the solutions (well, except for IE), I believe that my question is a duplicate of the one you cited. If I had more knowledge or reputation, I'd give you a vote but I can't seem to find out how. I was looking for a way to give you a vote by answering my question, citing your comment, but apparently I'm not yet allowed to do that. If you know how I can give you credit for the link, just let me know. – Jeff Holt Sep 20 '13 at 03:55
  • 1
    Welcome to SO! I was just commenting on your question and only answers can be accepted or upvoted; whichever one of the original answers helped you most is the one deserving an upvote anyway. I'm sure you'll have enough reputation to upvote useful answers in no time :) – Oleg Sep 20 '13 at 04:07

0 Answers0