从推荐的主机中加载 GPT
概览
这项评估旨在确保 Google 发布商代码 (GPT) 库能够正常加载
来自推荐的主机对于您的网页引用的每个新主机,浏览器都必须与该主机建立连接,这可能会耗费大量时间。通过从推荐的主机中加载 GPT,您可以确保将所有广告投放请求都发送到同一个网域,从而减少要建立的连接数并提高网页加载性能。
建议
确保 GPT 是从 securepubads.g.doubleclick.net
加载的。例如:
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
通过导航计时和资源计时评估实际加载性能
Google 发布商代码使用入门
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-15。
[null,null,["最后更新时间 (UTC):2024-10-15。"],[[["Loading the Google Publisher Tag (GPT) library from the recommended host (`securepubads.g.doubleclick.net`) improves page load performance by reducing the number of connections the browser needs to open."],["This audit ensures GPT is loaded from the optimal source to streamline ad serving requests and enhance overall website speed."],["Using the recommended host for GPT minimizes delays associated with opening new connections for each referenced host."]]],["The audit checks if the Google Publisher Tag (GPT) library loads from the recommended host, `securepubads.g.doubleclick.net`. Loading GPT from this host ensures all ad requests use a single domain, reducing connection time and improving page load speed. It is recommended to load GPT using the provided example script tag, ensuring that it's loaded from the specified domain. Using multiple hosts will slow the connection process.\n"]]