Iframe-resizer: Why we need iframe resizer

Created on 23 Jan 2018  路  1Comment  路  Source: davidjbradshaw/iframe-resizer

since we can easy control iframe height and width in the host page,SO WHY we need iframe-resizer?

The reason why I ask this question is someone ask us to use this library just because they want to control the iframe height and our site has been integrated as iframe in their site.

iframe {
 height: 500px // or height: calc(100% - $headerHeight - $footerHeigth) or height: calc(100vh - $headerHeight - $footerHeigth) or 
}

Most helpful comment

You only need the iframe-resizer library when the iframe content height is not known when the iframe is created. The parent window containing the iframe should not be able to access information such as the height of the iframe content due to sandboxing. If you know that the iframe will always be a fixed height (e.g. less than x px) or you do not mind having scrollbars or truncating the iframe content, then no, you do not need the library.

>All comments

You only need the iframe-resizer library when the iframe content height is not known when the iframe is created. The parent window containing the iframe should not be able to access information such as the height of the iframe content due to sandboxing. If you know that the iframe will always be a fixed height (e.g. less than x px) or you do not mind having scrollbars or truncating the iframe content, then no, you do not need the library.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TarsisDragomir picture TarsisDragomir  路  5Comments

snarfed picture snarfed  路  5Comments

frederic117 picture frederic117  路  4Comments

russellballestrini picture russellballestrini  路  4Comments

Testato picture Testato  路  6Comments