简体   繁体   English

如何推迟从Facebook页面插件解析javascript?

[英]How to defer parsing of javascript from the facebook page plugin?

in my GTMetrix rating ( https://gtmetrix.com/reports/um180grad.de/Z5fQRsag ) it says that the parsing of javascript should be deferred for resources that are loaded inside the Facebook page plugin. 在我的GTMetrix评级( https://gtmetrix.com/reports/um180grad.de/Z5fQRsag )中,它表示应推迟javascript的解析,以获取Facebook页面插件中加载的资源。

Eg: 例如:

    https://fbstatic-a.akamaihd.net/rsrc.php/v2/yS/r/26fwJhqLaJ4.js (220.9KiB)
    https://fbstatic-a.akamaihd.net/rsrc.php/v2/yX/r/y50fApjV6bw.js (129.8KiB)
   https://fbstatic-a.akamaihd.net/rsrc.php/v2/yX/r/y50fApjV6bw.js (129.8KiB)
    https://fbstatic-a.akamaihd.net/rsrc.php/v2/yA/r/qTOnSmrXUMu.js (91.7KiB)
    https://fbstatic-a.akamaihd.net/rsrc.php/v2/yA/r/qTOnSmrXUMu.js (91.7KiB)

I have already deferred my local resources with the WP Deferred Javascript WordPress Plugin. 我已经使用WP Deferred Javascript WordPress插件推迟了本地资源。

Is there any way to achieve this for the Facebook Scripts? 有什么方法可以实现Facebook脚本吗?

The same questions holds true for the GTMetrix message "Specify image dimensions" - I cannot change the image dimensions of the embedded facebook profile pics. 同样的问题也适用于GTMetrix消息“指定图像尺寸”-我无法更改嵌入式Facebook个人资料图片的图像尺寸。

The Facebook page plugin loads an iframe, by the way. 顺便说一下,Facebook页面插件会加载iframe。

Any help is appreciated! 任何帮助表示赞赏!

您可以使用图api来更改Facebook个人资料图像的尺寸。

graph.facebook.com/{user's FB ID}/picture?width=100&height=100

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM