Ercan Acar
Newbie
- Jun 6, 2020
- 9
- 14
Hi probably you know this javascript usage But maybe you didn't check it on wit Google pagespeed insights.
With this loading technique your web sites can get high or full score from google speed index engine.
look there it is very bad score, reason of my web site loading many external scripts.
Also I was loading google Adsense, Google Analytics, Alexa and som other ads scripts. All script loading with ASYNC and DEFER but really Google pagespeed insights was giving me Bad score, until I have found this technique.
With this technique I've loaded my external other script after page fully loaded. and waited after 3sec.
This two new things are the Trick. 1. After page load and 2. wait 3sec. (you can use 2.5 or 2.7 but I noticed 1sec and 2sec was not trick, test it)
For using this technique :
And now my javascript code: (I sad probably you know but I found trick for Google speed index)
Demo here: https://www.nasill.com/internet/google-siralamasi-icin-hiz-trick-nasil-yapilir
you can check it with Google pagespeed insights and if you look inside the codes really I have many script but Google pagespeed insights doesnt noticed that slow effects. And it gives me HIGH socre.
and after all my score is:
we tricked the Google 
With this loading technique your web sites can get high or full score from google speed index engine.
look there it is very bad score, reason of my web site loading many external scripts.
Also I was loading google Adsense, Google Analytics, Alexa and som other ads scripts. All script loading with ASYNC and DEFER but really Google pagespeed insights was giving me Bad score, until I have found this technique.
With this technique I've loaded my external other script after page fully loaded. and waited after 3sec.
This two new things are the Trick. 1. After page load and 2. wait 3sec. (you can use 2.5 or 2.7 but I noticed 1sec and 2sec was not trick, test it)
For using this technique :
- Remove all existing javscript load codes like script src=.... etc.
- move all these codes to inside of my javascript for manually and dynamically loading
- And see the result.
And now my javascript code: (I sad probably you know but I found trick for Google speed index)
JavaScript:
//published by https://NasiLL.com
window.addEventListener("DOMContentLoaded", function(){
window.setTimeout(function(){
var adsense = document.createElement('script');
adsense.type = 'text/javascript';
adsense.src = "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";
adsense.async="async";
adsense.defer="defer";
var att = document.createAttribute("data-ad-client");
att.value = "ca-pub-PUT YOUR CODE" ;
adsense.setAttributeNode(att);
var head = document.getElementsByTagName('head')[0];
head.appendChild(adsense);
//YOU CAN ADD YOU OTHER SCRIPTS HERE WITH SAME METHOD
}, 3000);
}, false);
Demo here: https://www.nasill.com/internet/google-siralamasi-icin-hiz-trick-nasil-yapilir
you can check it with Google pagespeed insights and if you look inside the codes really I have many script but Google pagespeed insights doesnt noticed that slow effects. And it gives me HIGH socre.
and after all my score is:

