My problem is that sometimes part of JavaScript (often Google Analytics) can take a very long time, although HTML does not need to be prepared for “moving and manipulating”. If I used the following code:
$(document).ready(function () { $("p").text("The DOM is now loaded and can be manipulated."); });
Does this mean that the <p> will not be filled until something like Google Analytics loads?
Something like Google Analytics is usually not required on most websites, and I often find that I'm waiting for it to load. (I do not want to use onload because of its unreliability .)
Is there a better way or way to say "don't wait [...]"?
Note. Usually I can’t put the code in the <script> tag immediately before the </body> , because the site is based on a template. Usually I can only edit the "content" of a page.
jquery onload google-analytics
Darryl hein
source share