I Have Two Iframe On Same Page But It Load In Different Time Duration
I have two or more iframe on the same page. I have to load all iframe at once and appear in same time. Currently it loaded one by one. I want to load all at once and asynchronous w
Solution 1:
My solution:
- First add hidden css to all iframe's.
- Then use onload method on each iframe. This method will add some
classes for example
loaded
and check on finish is all iframe has this class. - If don't have - do nothing, otherwise show all iframes.
Here you can find example of usage onload method: demo
Solution 2:
I think this link will greatly help you. It's a nice detailed explanation of the iframe techniques and performance issues and might just what you are looking for. As mentioned in the above answer and in this link here, the onLoad function call is what you are going to need.
Post a Comment for "I Have Two Iframe On Same Page But It Load In Different Time Duration"