I was just testing some stuff and came across the interesting iframe
behavior.
On the page i have the following iframe
:
<iframe src="/Wizard/Start"></iframe>
Now, if the src
of iframe
is the same as url of the page (.../Wizard/Start)
, the iframe
does not load the contents, just remains blank and there is no errors, warnings or anything reported.
I can see that this is by design, acts the same in all browsers.
Why? Any official documentation on this behavior?
You have to check for HTTP response header X-Frame-Option of those sites. if its value is "DENY or SAMEORIGIN", then you can not load those website in the iframes. DENY = No one can load the website in iframe. Even the same domain page wont be able to load.
It shouldn't block. If you want the main page to fully load first (eg, main page's images before iframe content) then you'll have to use a bit of javascript to set the url of the iframe, like <body onload="javascript:..."> Main document's onload won't fire until all iframes have been loaded.
You cannot fix this from Power Apps Portal side. Most probably web site that you try to embed as an iframe doesn't allow to be embedded. You need to update X-Frame-Options on the website that you are trying to embed to allow your Power Apps Portal (if you have control over that website).
This is indeed the specified behaviour. The answer to your question is in this document:
http://www.w3.org/TR/WD-frames-970331
In the section "Infinite Recursion" it says:
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.
The document dates back to 1997 but hasn't been superseded yet, as far as I know.
you mean you are loading the iframe of "abc" page of abc page??
_____________________
| |
| IFrame |
---------------------|
| |
| Page |
| |
_____________________
and here iframe again pointing to the same page right?? see it will not work as it become the infinite loop..
you are trying to load the same page in iframe.. mean the content of iframe again contains another iframe which again pointing to the same page which again has the iframe.. so it will be infinite loop and thats why it will not work..
on page "xyz" you can include the iframe of "abc", it will not be a problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With