تحميل علامة الإعلان بشكل غير متزامن
نظرة عامة
تضمن عملية التدقيق هذه تحميل النصوص البرمجية لمكتبات علامات الإعلانات بشكل غير متزامن.
ويتم تنفيذ JavaScript بشكل متزامن تلقائيًا. هذا يعني أنه بمجرد أن يتم
استخدام النص
يتعذّر تحميل أي محتوى آخر إلى أن يتم الانتهاء من معالجة هذا النص البرمجي
وتحليله وتنفيذه. ويؤدي تفعيل التنفيذ غير المتزامن إلى منع ذلك، ما يسمح للمتصفِّح بمواصلة معالجة الموارد الأخرى أثناء تحميل النص البرمجي المحدَّد في الخلفية. ويساعد هذا الإجراء على استمرار تجاوب الصفحة أثناء تحميل النصوص البرمجية وتقليل الوقت اللازم لتحميل جميع المكونات المُهمّة.
اقتراحات
ضمِّن السمة غير المتزامنة في تعريف علامة النص البرمجي. على سبيل المثال:
AdSense
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
AdSense (الإعلانات التلقائية)
<script async data-ad-client="ca-pub-xxxxxxxxxxxxxxxx" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
علامة "ناشر Google"
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
يتمّ دعم النصوص البرمجية التالية لمكتبات علامات الإعلانات:
مكتبة علامة الإعلان |
النصوص |
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
|
بدء استخدام علامات "ناشر Google"
أوضاع طلب علامة "ناشر Google" والعرض غير المتزامن
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-10-15 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-10-15 (حسب التوقيت العالمي المتفَّق عليه)"],[[["This audit verifies if ad tag library scripts are loaded asynchronously to improve page performance."],["Asynchronous loading allows the browser to load other content while the script loads in the background, preventing delays and improving user experience."],["To enable asynchronous loading, include the `async` attribute within the `\u003cscript\u003e` tag when implementing ad tags like AdSense and Google Publisher Tag."],["Synchronous loading, where the browser waits for the script to fully load before proceeding, can negatively impact page load times and overall performance."]]],["To optimize page load times, ad tag library scripts should load asynchronously. This is achieved by including the `async` attribute within the `\u003cscript\u003e` tag. Asynchronous loading allows the browser to continue loading other page content while the script downloads and executes in the background. Supported ad tag libraries include AdSense and Google Publisher Tag, with specific script URLs like `pagead2.googlesyndication.com/pagead/js/adsbygoogle.js` and `securepubads.g.doubleclick.net/tag/js/gpt.js` needing the `async` attribute.\n"]]