Closed Bug 540364 Opened 16 years ago Closed 15 years ago

iframes containing dynamic content that changes on refresh do not display correctly after content changes

Categories

(Firefox :: General, defect)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: andy.white, Unassigned)

Details

(Whiteboard: [CLOSEME 2011-1-30])

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 If you have a page with two iframes on it, and one of them is changed dynamically by some means upon refresh (ie. the content of that frame changes), the iframe does not display correctly after that refresh. Example: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <HTML XMLNS="http://www.w3.org/1999/xhtml"> <head> <title>Test Case</title> </head> <body> <div id="foobox"> &nbsp; </div> <div id="gleebox"> <iframe src='iframe.html'> </iframe> </div> <div>And this is another element further down, for the purposes of testing. Whee!</div> <script type="text/javascript" src="foobox.js"></script> </body> </html> With the following javascript: var foobox = document.getElementById("foobox"); var gleebox = document.getElementById("gleebox"); if (navigator.userAgent.indexOf("MSIE 6.0") >= 0) { foobox.innerHTML = "Foo"; //document.write("<link rel='stylesheet' href='notfox.css' type='text/css'/>"); } else { foobox.innerHTML = "<iframe id='fooboxiframe' src='http://www.google.com'><img src='http://google.com/intl/en_au/images/logo.gif'/></iframe>"; var number = (Math.random() * 100); if(number >= 50) { gleebox.innerHTML = "<iframe id='gleeboxiframe' src='http://www.sitepoint.com'></iframe>"; } else { gleebox.innerHTML = "<iframe id='gleeboxiframe' src='http://www.wired.com'></iframe>"; } } If you reload a few times, you'll see first one page (either Wired or Sitepoint) load in the second iframe. Reload a few more times (to trip the random number generator check) and the second iframe (gleebox) will be the same as the first (in this case, showing Google), rather than showing the alternative site! Reproducible: Always Steps to Reproduce: 1. Load a page containing two iframes, at least one of which is dynamically populated 2. Reload same page until dynamically populated iframe's content changes 3. Et voila, you have weirdness See code example included, above. Actual Results: Two iframes, both identical in content (despite having different id and src attributes as expected) Expected Results: The second iframe should contain content from either wired.com or sitepoint.com (as in the example) This is giving us some trouble on sitepoint.com/blogs - every now and then, some of our ads fail to display correctly (the banner at the top, specifically, will mirror in content the in-line ad in the content of a blog post). The effect is not consistent however, and this test case is the closest I've come to an explanation for what we're seeing.
Reporter, are you still seeing this issue with Firefox 3.6.13 or later in safe mode? If not, please close. These links can help you in your testing. http://support.mozilla.com/kb/Safe+Mode http://support.mozilla.com/kb/Managing+profiles You can also try to reproduce in Firefox 4 Beta 8 or later, there are many improvements in the new version, http://www.mozilla.com/en-US/firefox/all-beta.html
Whiteboard: [CLOSEME 2011-1-30]
No reply, INCOMPLETE. Please retest with Firefox 3.6.13 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.