بارگذاری برچسب آگهی به صورت ناهمزمان
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
نمای کلی
این ممیزی اطمینان حاصل می کند که اسکریپت های کتابخانه برچسب آگهی به صورت ناهمزمان بارگیری می شوند.
به طور پیش فرض، اجرای جاوا اسکریپت همزمان است. این بدان معناست که هنگامی که با یک اسکریپت مواجه می شوید، تا زمانی که آن اسکریپت دانلود، تجزیه و اجرا نشده باشد، هیچ محتوای دیگری نمی تواند بارگیری شود. انتخاب اجرای ناهمزمان از این امر جلوگیری می کند و به مرورگر اجازه می دهد تا زمانی که اسکریپت مشخص شده در پس زمینه بارگذاری می شود، به پردازش منابع دیگر ادامه دهد. این صفحه شما را در حین بارگذاری اسکریپت ها پاسخگو نگه می دارد و زمان لازم برای بارگیری تمام اجزای حیاتی را کاهش می دهد.
توصیه ها
ویژگی async را در تعریف تگ اسکریپت قرار دهید. به عنوان مثال:
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 Publisher
<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 Publisher | googletagservices.com/tag/js/gpt.js securepubads.g.doubleclick.net/tag/js/gpt.js |
با برچسبهای ناشر Google شروع کنید
حالت های درخواست GPT و رندر ناهمزمان
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThis audit verifies if ad tag library scripts are loaded asynchronously to improve page performance.\u003c/p\u003e\n"],["\u003cp\u003eAsynchronous loading allows the browser to load other content while the script loads in the background, preventing delays and improving user experience.\u003c/p\u003e\n"],["\u003cp\u003eTo enable asynchronous loading, include the \u003ccode\u003easync\u003c/code\u003e attribute within the \u003ccode\u003e<script>\u003c/code\u003e tag when implementing ad tags like AdSense and Google Publisher Tag.\u003c/p\u003e\n"],["\u003cp\u003eSynchronous loading, where the browser waits for the script to fully load before proceeding, can negatively impact page load times and overall performance.\u003c/p\u003e\n"]]],["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"],null,[]]