Search code examples
javascriptjqueryinternet-explorernivo-slider

Nivo slider jQuery causing a mixed content error in IE 8?


I have an issue where I'm using the Nivo jQuery slider on a HTTPS: site and its javascript seems to be throwing a mixed content error in IE 8.

I currently have a forum post up in the Dev7 Studios forum with no response yet. And I've googled for a couple of days on the IE 8 mixed content error.

So far, I haven't found a clear fix except for one post where a guy stated that sometimes the "innerHTML" in a jquery file can cause the error. But he didn't really list a clear fix.

Does anyone have any insight in to this? Any help or direction appreciated.


Solution

  • I ran into the same problem, and have traced it to a bug in IE8. The comments on this page led me to a solution:

    http://blogs.msdn.com/b/ieinternals/archive/2009/06/22/https-mixed-content-in-ie8.aspx

    This MS dev says:

    Fascinating. This is a race condition.

    The debugger reports that the following is the URL that is triggering the prompt:

    "about:/images/lightview/inner_slideshow_play.png"

    Of course, that URL doesn't actually exist in your markup. It looks like there's dynamic creation of an IFRAME and injection of content into that frame. The default URL for an empty frame is about:blank, which leads to the prompt.

    As a workaround, using an absolute URL would probably work, or by initializing the IFRAME with a the SRC of a blank page on your server (this should also fix the Mixed Content problem with IE6).

    Normal browsers don't have a problem with URLs for dynamic content that aren't fully qualified, protocol and all. But IE8 sometimes drops the ball and instead of putting in the protocol and host, it puts in "about:" in front of your path, and fails to trust that in a https context.

    I edited nivoslider to qualify the URLs of all the images it draws dynamically. Further development would be needed to allow use of query strings in image URLs.

    Here's my edited source.