レンダリング ブロック リソースを回避する
概要
この監査では、広告タグライブラリの読み込みを遅延しているリソース(具体的には、スクリプトとスタイルシート)が特定されます。広告タグライブラリの読み込みが開始される前にリクエストされ、受信したリソースです。タグの読み込み前にリクエストするリソース数を減らすと、広告の読み込みが速くなります。
推奨事項
この監査の詳細には、タグの読み込みを遅延しているすべてのスクリプトとスタイルシートのリストが含まれます。目標は、このリストのエントリ数を可能な限り 0 に近づけることです。ヒントをいくつかご紹介します。
- 広告タグライブラリをページの
<head>
の早い段階で読み込む。
- コア機能に不可欠なスクリプトとスタイルシートを HTML に直接インライン化する。
- 重要でないスクリプトを
async
属性または defer
属性でマークする。
- メディアクエリでスタイルを異なるファイルに分け、
media
属性を使用して必要な場合にのみスタイルを読み込む。
次の広告タグ ライブラリ スクリプトがサポートされています。
ライブラリ |
スクリプト |
AdSense |
pagead2.googlesyndication.com/pagead/js/adsbygoogle.js
pagead2.googlesyndication.com/pagead/show_ads.js
|
Google パブリッシャー タグ |
googletagservices.com/tag/js/gpt.js
securepubads.g.doubleclick.net/tag/js/gpt.js
|
レンダリング ブロック リソース
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-06-26 UTC。
[null,null,["最終更新日 2024-06-26 UTC。"],[[["This audit helps identify scripts and stylesheets that slow down the loading of ad tags by being requested before them."],["Reducing the number of these resources loaded prior to ad tags can significantly improve ad loading speed."],["Optimization strategies include loading ad tags earlier, inlining critical resources, using `async` or `defer` for non-critical scripts, and separating stylesheets by media query."],["Supported ad tag libraries include AdSense and Google Publisher Tag, with specific script URLs for identification."]]],["The audit identifies scripts and stylesheets that delay ad tag library loading. To improve ad loading speed, reduce the number of resources requested before tag loading. Key actions include loading ad tag libraries earlier, inlining critical scripts/stylesheets, marking non-critical scripts with `async` or `defer`, and using the `media` attribute for conditional stylesheet loading. Supported ad tag libraries include AdSense and Google Publisher Tag, each with specific script URLs. The goal is to have minimal or zero items on this list.\n"]]