Need help with inconsistent loading iframe
I'm trying to开发者_JS百科 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
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.
精彩评论