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:
1 | <iframe id="map0921" style="border: 0;" src=" " width="100%" height="450" frameborder="0" allowfullscreen="allowfullscreen"></iframe> |
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:
1 2 3 4 5 6 7 8 | <script> window.onload = function(){ setTimeout(function(){ document.getElementById('map0921').src = 'your url'; },5000); }; </script> |
5000 – this is the delay in milliseconds.