leekin 发表于 2023-7-29 16:41:00

GoogleAdsense广告提前加载技巧

用这个方法来获得Adsense广告展示的加载速度,尤其在移动设备有明显区别,起到预连接的作用,用这个方法有可能会干扰 AdSense 要求的广告请求所需的请求顺序和所需要的和 Cookie!
<link rel="preconnect"
href="https://adservice.google.com/" crossorigin="anonymous">
<link rel="preconnect"
href="https://googleads.g.doubleclick.net/" crossorigin="anonymous">
<link rel="preconnect"
href="https://www.googletagservices.com/" crossorigin="anonymous">
<link rel="preconnect"
href="https://tpc.googlesyndication.com/" crossorigin="anonymous">知道小圈子内有大佬们用dns 预取的不在少数,当年应哥曾发过一次贴,后来找不到了,整理下再分享一下,能更快的加载Adsense广告,最好用wordpress的网站上用LScache插件配合。
<link rel='dns-prefetch' href='//fonts.gstatic.com' /><link rel='dns-prefetch' href='//b.scorecardresearch.com' /><link rel='dns-prefetch' href='//securepubads.g.doubleclick.net' /><link rel='dns-prefetch' href='//pubads.g.doubleclick.net' /><link rel='dns-prefetch' href='//www.google-analytics.com' /><link rel='dns-prefetch' href='//www.googletagservices.com' /><link rel='dns-prefetch' href='//tpc.googlesyndication.com' /><link rel='dns-prefetch' href='//fonts.googleapis.com' /><link rel='dns-prefetch' href='//ajax.googleapis.com' /><link rel='dns-prefetch' href='//www.google.com' /><link rel='dns-prefetch' href='//googleads.g.doubleclick.net' /><link rel='dns-prefetch' href='//sb.scorecardresearch.com' /><link rel='dns-prefetch' href='//pagead2.googlesyndication.com' /><link rel='dns-prefetch' href='//www.googletagmanager.com' /><link rel='dns-prefetch' href='//cse.google.com' /><link rel='dns-prefetch' href='//connect.facebook.net' /><link rel='dns-prefetch' href='//www.googleadservices.com' /><link rel='dns-prefetch' href='//adservice.google.co.in' /><link rel='dns-prefetch' href='//protagcdn.com' />www.gstatic .com“域名会显示在 Adsense 上的”我的网站“列表中,是Google拥有的域名,


预连接可以完成dns-prefetch所做的一切交互,同时也处理TLS协议和TCP信息交互。有些浏览器无法识别预连接,大家使用时注意看后台广告展示时间对比就能看到。
应哥、老大不要删贴哈,赚点刀币不易......手下留标:)

王太保 发表于 2023-8-8 16:38:54

老外喜欢用这个 国人用的少

875887 发表于 2023-8-21 11:19:51

收藏备用感谢

pronhub 发表于 2024-3-20 15:14:05


收藏备用

王俊杰2017 发表于 2024-3-22 20:53:46

抓包后对比有优势
页: [1]
查看完整版本: GoogleAdsense广告提前加载技巧