หลีกเลี่ยงการรอเหตุการณ์การโหลด
ภาพรวม
การตรวจสอบนี้จะตรวจสอบว่าคำขอโฆษณาแรกถูกบล็อกในเหตุการณ์การโหลดหน้าเว็บหรือไม่ ตัวคำขอโฆษณาเองจะไม่โต้ตอบกับ DOM และไม่ขึ้นอยู่กับหน้าที่โหลดเสร็จแล้ว ดังนั้นจึงขอแนะนำให้สร้างคำขอโฆษณาให้เร็วที่สุดเท่าที่จะทำได้เพื่อให้โฆษณาโหลดเร็วขึ้น
การแนะนำวิดีโอ
นำตรรกะที่ป้องกันไม่ให้มีการสร้างคำขอโฆษณาก่อนที่หน้า load
หรือเหตุการณ์ domContentLoaded
จะเริ่มทำงานออก
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-06-26 UTC
[null,null,["อัปเดตล่าสุด 2024-06-26 UTC"],[[["This audit verifies if the initial ad request is delayed until after the page load event, potentially slowing down ad loading times."],["Ad requests can be made before the page fully loads, as they don't depend on the DOM."],["Optimize ad loading speed by removing any code that prevents ad requests before the `load` or `domContentLoaded` events."]]],["The audit verifies if the initial ad request is blocked during a page load. Ad requests are independent of the DOM and do not require a fully loaded page. It's advised to initiate ad requests as early as possible to accelerate ad loading. To improve ad loading speed, logic that delays ad requests until after the `load` or `domContentLoaded` events should be removed.\n"]]