Safari's never-ending loading message when an iframe does not have a src

Posted by Matthew Pennell on Stack Overflow See other posts from Stack Overflow or by Matthew Pennell
Published on 2010-04-26T10:33:11Z Indexed on 2010/04/26 14:03 UTC
Read the original article Hit count: 282

Filed under:
|
|

I'm using @rem's jQuery :visited plugin to do something with visited links on a page. The plugin works by creating an invisible iframe, injecting the HTML source, and comparing the colour of links to see which have been visited. It works perfectly.

The problem I have is that on Safari, the status bar message always hangs on "Loading (X-1) of X items" - i.e. it thinks there is still some resource still needing to be loaded. I've narrowed it down to this plugin, and the fact that it attaches the IFRAME element to the BODY before the src is set (or injected in this case).

I've tried rearranging the code to set the src before the append happens, but that breaks the plugin's functionality.

Anyone have any ideas how to fix this issue? It's not a major issue as the site still functions perfectly well, but it's an annoying glitch that could be confusing to users.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about visited