There is one alternative to the <iframe>
and the <object>
. It can also display content from various sources. The pro is that it complies with xhtml standards and is encouraged to use, but there is no such broad / useful support in older browsers (you need to mess with it to get it right in IE). It was used as follows:
<object data="page.html" width="400" height="300" type="text/html"> Alternative Content </object>
This is a direct answer to your question, I donโt think it will give you any speed advantage. For the very reason that the <iframe>
element is much more used and therefore more tested and taken care of than the <object>
.
For myself, I have never seen an <iframe>
cause a slowdown, but it is still possible. If this is an option, you should definitely try what ocanal said in the comments: let your script work with container-container-container instead of body-element and therefore embed it directly on the main page.
For a browser, it doesn't have to be much more than some of the overhead of processing a second document, so you can guess that it is a bit more to make your computer slow. Therefore, it might be a good idea to optimize the code as a whole:
V02460
source share