Our blogspot has an embedded iframe coming off of personal server with Facebook code embedded within the frames.
To properly defer the facebook app from executing and affecting scores on GTMetrix/Pagespeed/YSlow:
This code is placed in the headers of blogger template. (That is, somewhere before </head>).
Note:* I have purposely set the code where it contains < instead of < which would result in a parsing error if pasted into blogger's template.
The code for iframe is embedded within the individual posts, at the bottom.
On the embed code, simply change src to data-src.
This cool solution was discovered at “Deferring”.
Prior errors that were located on GTMetrix with Facebook :
To defer loading of images, in this case statcounter, the same source provides another code to defer image loading
The following goes in the body of document:
To defer loading of AddToAny Social Media Widget
The normal code appears like this:
The adjusted code will appear like this:
goes above </head>
goes in the body
Thanks again to the designer at Varvy for this wonderful script too.
Once fully loaded, if the visitor clicks on the browser back button, the user is carried back to where they came from before the embedded redirect was loaded. During GTMetrix testing the “Fully Loaded Time” was decreased from 2.5 seconds average to between 1.1 and 1.5 second on average with Pagespeed score of 99% and YSlow score of 98%.
10000 = 10 seconds.