You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to balance Lighthouse for Ads and normal Lighthouse, GPT library is preloaded using <link rel=prefetch as=script href="https://securepubads.g.doubleclick.net/tag/js/gpt.js"/> which is later converted into <script src="https://securepubads.g.doubleclick.net/tag/js/gpt.js">
With this approach, Ligthouse for Ads yields 2 issues which we consider are not accurate
Tags best practices - Load tags only once per frame Here I think that Ligthouse is wrongly detecting that GPT library is being loaded twice, and if you check the network panel in Dev tools it actually appears twice, but the first one is initiated by <link rel="prefetch"> and the second one by <script> but is coming from the cache
Ad speed - Load ad scripts statically Again, it seems that Lighthouse is yielding this error because our approach of using first <link rel="preload"> and later converting it to <script> But we consider this a fair approach, in order to control the initial amount of Javascript being executed and to don't penalize the Time to Interactive, or First Input Delay.
In our case, we use this approach in order to prioritize the execution of the CMP over the GPT library, in order to retreive user content, which is mandatory in Europe before start loading ads.
The text was updated successfully, but these errors were encountered:
Thanks for raising this issue. We'll work on fixes.
For issue (1), I would expect the browser to issue only one request in your case since the request for script tag should hit the prefetch cache. But that doesn't appear to be happening here.
For some additional background on (2), we discussed similar issues in issue #128. I'll look into your site a bit further and propose a change soon.
Site: https://mejorconsalud.com
You can see an audit example here
In order to balance Lighthouse for Ads and normal Lighthouse, GPT library is preloaded using
<link rel=prefetch as=script href="https://securepubads.g.doubleclick.net/tag/js/gpt.js"/>
which is later converted into<script src="https://securepubads.g.doubleclick.net/tag/js/gpt.js">
With this approach, Ligthouse for Ads yields 2 issues which we consider are not accurate
Tags best practices - Load tags only once per frame Here I think that Ligthouse is wrongly detecting that GPT library is being loaded twice, and if you check the network panel in Dev tools it actually appears twice, but the first one is initiated by
<link rel="prefetch">
and the second one by<script>
but is coming from the cacheAd speed - Load ad scripts statically Again, it seems that Lighthouse is yielding this error because our approach of using first
<link rel="preload">
and later converting it to<script>
But we consider this a fair approach, in order to control the initial amount of Javascript being executed and to don't penalize the Time to Interactive, or First Input Delay.In our case, we use this approach in order to prioritize the execution of the CMP over the GPT library, in order to retreive user content, which is mandatory in Europe before start loading ads.
The text was updated successfully, but these errors were encountered: