我在頁面底部添加了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