Preventing YouTube embeds loading multiple instances of player JS?

In theory youtube embedding is done as iframes, and iframe are virtual additional independent web pages which are rendered at the same window, therefor the content of one iframe can not gave an impact on other iframes.

In practice, such JS will be cached in the browser. The first one may get loaded, but the second one (unless someone in google had a big oooops moment) will be “served” from the browser’s cache.

to directly answer the question – there is not much that can be done on wordpress side to avoid it, and most likely there is nothing that need to be done

Leave a Comment