Question

I'm trying to include a Facebook share iframe on a site that's served using Flask and Apache. The iframe loads inconsistently however and I am at a loss for possible explanations. Here is what I have observed:

  • The iframe loads correctly in Firefox and Safari but not Chrome 10.0 dev, on Mac
  • In Chrome, the iframe never loads correctly when I load the entire page
  • If I strip half of the elements from the page, the iframe loads correctly maybe three times out of ten - doesn't matter which half I remove.
  • If I strip all of the elements from the page, the iframe loads correctly every time.

The inconsistent behavior makes me think there's some sort of race going on, but I don't understand what the problem would be, or why it would only appear in Chrome. Anyway, I appreciate your help. You can view the site here. Thanks, Kevin

Was it helpful?

Solution

I think they key is in this statement:

If I strip half of the elements from the page, the iframe loads correctly maybe three times out of ten - doesn't matter which half I remove.

I'd dump the output to a text file and would run tidy(1) or xmllint(1) over the response to see if you have a mis-matched HTML tag. Chances are Chrome is not handling the error correctly, but Firefox and Safari are able to recover.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top