Will using an Iframe for another file on your server make the page being loaded faster than…

So I have a webpage index.php
and it pulls in a Facebook post with the embedded post method that facebook provides. The problem is that it takes a ridiculous amount of time for that content to load. My idea was to load that embedded facebook post on another page like post.php
and JUST that content itself with nothing else on the page. Then load it onto the page that I want to use it on using IFrames like so:


So now my question is:

Will using this method improve the load time of my main page (index.php) then just loading the Facebook content on the page itself?

If I am not mistaken then an
should be treated just like an asset such as CSS, JS, and image files.

The issue to watch out for is that web browsers generally have a limit on concurrent downloads
so if your main page has 10 images, 5 above the
and 5 below it then the
can potentially delay the other images if the
has 50 images to load.

However, if your
is merely taking forever then I think the remaining 5 images should load no problem.

It is very possibly to solve this much more gracefully with AJAX loading of this content because you will have much more granular control.

Hello, buddy!稿源:Hello, buddy! (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 前端开发 » Will using an Iframe for another file on your server make the page being loaded faster than…

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录