Reputation: 2505
I have a page at http://localhost/page1 and On that page i am showing http://localhost/page2 content in an iframe in some div.
It works fine in chrome. However in firefox, page2 does not show up.
I don't get any warnings/error in firefox console.
Since both the pages have same domain. firefox should correctly load page2 iframe
Am i missing something obvious?
Upvotes: 3
Views: 996
Reputation: 7231
It is purposefully loads an empty iframe. This happens in Firefox to prevent infinite recursion.
According to the W3C specification on frames:
Infinite recursion is prevented. Any frame that attempts to assign as its SRC a URL used by any of its ancestors is treated as if it has no SRC URL at all (basically a blank frame). This doesn't prevent all malicious documents, but it eliminates a troublesome class of them.
Please see the attached stackoverflow article - this is where I found the answer.
Upvotes: 1