หลีกเลี่ยงทรัพยากรที่บล็อกการแสดงผล
ภาพรวม
การตรวจสอบนี้จะระบุทรัพยากร (โดยเฉพาะสคริปต์และสไตล์ชีต) ที่ทำให้การโหลดไลบรารีแท็กโฆษณาล่าช้า ซึ่งเป็นทรัพยากรที่มีการขอและได้รับแล้วก่อนที่ไลบรารีแท็กโฆษณาจะเริ่มโหลด การลดจำนวนทรัพยากรที่ขอก่อนโหลดแท็กจะทำให้โฆษณาโหลดเร็วขึ้น
การแนะนำวิดีโอ
รายละเอียดของการตรวจสอบนี้ประกอบด้วยรายการสคริปต์และสไตล์ชีตทั้งหมดที่ทำให้การโหลดแท็กล่าช้า เป้าหมายคือการลดจำนวนข้อมูลในรายการนี้ให้ใกล้เคียง 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"]]