Posts

Showing posts with the label Loading of iFrame

Iframe loading techniques and performance

Iframes are used to display a web page within a web page, load third party content, ads and widgets. The main reason to use the iframe technique is that the iframe content can load in parallel with the main page: it doesn't block the main page. There are two drawbacks in using iframe, Iframes block onload of the main page The main page and iframe share the same connection pool  The onload blocking is the biggest problem of the two and hurts performance the most. You really want the load event to fire as soon as possible. Here we will see different ways to load the iframe. Normal Iframe You all know this one. It's the default way to load an iframe and works in all browsers: <iframe src="/path/to/file" frameborder="0" width="728" height="90" scrolling="auto"> </iframe> Using the Normal Iframe technique will result in the following behaviour in all browsers: Iframe starts l...