Pete Warden

PeteSearch on Firefox adds a couple of icons next to every search result, to show a split-screen or text preview of the page. To add these icons to the page, I just use the chrome:// protocol to reference the icon pngs that are part of my extension on-disk inside an <img> tag.

I tried doing something similar with my BHO, referencing the installed location of my BHO using the file:// protocol. This fails, I'm guessing due to cross-domain scripting security policies.

If the data:// protocol was supported, I could supply the image data directly
, but that's not an option on IE. At the moment, I'm referencing the images from my own server, but this is not ideal since it raises privacy concerns for users (eg is it phoning home ) and seems inefficient.

Is there any way to create an image element from local data in a BHO I was hoping for a IHTMLDocument3.createImageElement(dataInMemory) equivalent call, but I haven't been able to find anything. Any ideas

Pete


Re: Internet Explorer Extension Development Adding local images to a remote page?

IECUSTOMIZER

Hi Pete,

Have you tried the res:\\ protocol Add your images as a type 23 resource to your BHO dll/exe.

Regards.






Re: Internet Explorer Extension Development Adding local images to a remote page?

Pete Warden

Thanks Rob, that is a good idea, I hadn't seen that protocol. I'll try it and see if that works. This line in the res:// docs does make me wonder if the cross-domain security policy may interfere
------
Note Internet Explorer 6 Service Pack 1 (SP1) no longer allows browsing a local machine from the Internet zone. For instance, if an Internet site contains a link to a local file, Internet Explorer 6 SP1 displays a blank page when a user clicks on the link. Previous versions of Internet Explorer followed the link to the local file.
------




Re: Internet Explorer Extension Development Adding local images to a remote page?

legege

However, this only works for non-SSL web sites.