我在页面底部添加了jQuery。然而,当我在PageSpeed Insights的运行我的网站(移动),我得到的错误:使用PageSpeed消除jQuery的渲染阻塞JavaScript
Eliminate render-blocking JavaScript and CSS in above-the-fold content Your page has 2 blocking script resources and 1 blocking CSS resources.
This causes a delay in rendering your page. None of the above-the-fold content on your page could be rendered without waiting for the following resources to load.
Try to defer or asynchronously load blocking resources, or inline the critical portions of those resources directly in the HTML.
见:http://learnyourbubble.com和https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Flearnyourbubble.com&tab=mobile
然而,jQuery是在页面的底部加入。所以它应该低于折扣。
我该如何删除此错误?
我不知道你的意思,因为它实际上抱怨'jquery.min.js','foundation.min-b3d0e64456.js'和'风格3cc919a01d.css'。我明白为什么它会抱怨这种风格。css',但我不明白为什么它会抱怨另外两个js文件,就像页面结束一样。我为这个问题添加了一个pagespeed链接。请记住我正在查看的“移动”标签。 –
你是完全正确的!我的答案与真正的问题无关。我做了一个快速编辑并提供了一些资源。 – jpopesculian