Skip to content

Instantly share code, notes, and snippets.

@nstone101
Created November 12, 2020 07:43
Show Gist options
  • Save nstone101/8acb52c6eef2e5ae44723c97283c802f to your computer and use it in GitHub Desktop.
Save nstone101/8acb52c6eef2e5ae44723c97283c802f to your computer and use it in GitHub Desktop.
/* Defer parsing of JavaScript #905090, 905090 Website speed tast trick, website fast load, javascript website load slow, slow website, Defer parsing website problem */
// This is load slow
<script src='https://www.google.com/recaptcha/api.js' async></script>
//Use this One when you are using Google Recaptcha
// Ye jb load fast hoga jb website complite download ho jaye gi
<script type="text/javascript">
function downloadJSAtOnload() {
var element = document.createElement("script");
element.src = "https://www.google.com/recaptcha/api.js";
document.body.appendChild(element);
}
if (window.addEventListener)
window.addEventListener("load", downloadJSAtOnload, false);
else if (window.attachEvent)
window.attachEvent("onload", downloadJSAtOnload);
else window.onload = downloadJSAtOnload;
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment