Blog

Delay loading iframe

The iframe tag creates a window that is inside a regular document, and it allows you to load any other independent documents into the specified size. Since it is loaded from an external source, naturally it affects the page loading speed. Alternatively, you can postpone the loading of the iframe window for some time so that the page loads faster, thereby increasing its pagespeed performance.

So, the code:

In the right place of the site set the frame with an empty src value.
Next, in footer.php of your theme, you need to copy this script:

5000 – this is the delay in milliseconds.

© Copyright 2014 -  vchuy-develop.com. All rights reserved