2017-03-05 4 views
2

私の友人は自分のサイトをスピードアップしたいと思っています。 彼は私にいくつかの分析なぜwordpressはjqueryを前に置いていますか?

を送信し、これは、それに伴う問題は、それはWordPressファイルのある分析

Your page has 1 blocking script 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. 
Remove render-blocking JavaScript: 

    http://***.id/wp-includes/js/jquery/jquery.js 

です。

なぜheck wordpressにはウェブサイトの上にjquery.jsが含まれていますか?

これは底にはありませんか?

+0

このようにしてください:http://wordpress.stackexchange.com/a/51140 – LGSon

+0

jQueryを使用する他のスクリプトが '$(document).ready(...)'を使用していることを確認してください。 – casraf

答えて

0

もちろん、wp_deregister_script( 'jquery')を使用できます。 この関数はjqueryを無効にします。この後、wp_footerアクションを使用してフッターにjqueryを登録できますが、後でwp関数が壊れる可能性があります。jqueryの登録を解除してwp_headアクション。 または、非同期で含めると、jqueryスクリプトに "async"属性を追加するだけです。

関連する問題