
I think this could be something Google changed in ga.js.

This same error I can find in the website. My website is (if you want to test), and the problem occurs when you try to change the recent topics page, clicking in the button "Próximo" (but the problem only arrives after ga.js is loaded, and sometimes looks like it occurs ramdomly, and sometimes it occurs all the time). (a,b) has no method 'cookie'įrom my own server, and no page from my website used toĬDN (now I've changed to google CDN to check if it could fix it, but no), and even with this in mind, ga.js brings with it this from google, again (it was already loaded).

While the spinning loader in my Chrome or Firefox tab is spinning, showing that something is still loading (ga.js), everything works fine.īut, suddenly, ga.js loads and it brings with it from /ajax/libs/jquery/1.7.1, and from now on my jQuery script stops working! And the message I get from the google "Inspect Element" is: Is setup) is taking a long long time to load (this behavior wasn't common three days ago, and no modification was made in my website). When I access my website (through Chrome and Firefox for Mac, or Chrome and Safari for iOs), So before we enqueue our own version of jQuery, we must de-register the WP version.For the last three days, with a jQuery script that was working for the last 2 years without modifications. We could simply enqueue it, but then there would be two copies/versions of jQuery loaded on the page (yours and WP’s). Now, let’s say that we want to use a version of jQuery that is different than the one that is included with WordPress. So when we declare our custom script, we set the $deps parameter equal to array('jquery') and call it a day. Wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ) For reference, here are the parameters used for wp_enqueue_script(): This declares jQuery as a dependency for my-custom-script, so WordPress automatically will load its own copy of jQuery. '/js/my-custom-script.js', array('jquery'), null, true) The smart loading requires that you specify jquery as the $deps parameter when enqueuing your other JavaScript files, for example: wp_enqueue_script('my-custom-script', get_template_directory_uri(). These days, WordPress automatically loads jQuery for you, whenever some other script requires it. Much has changed with WP script loading since this article was posted.


How was your plugin to know you already had it loaded? For one thing, some plugins use the jQuery library, and they are going to load it as well. If you want, you can just download jQuery, put it on your server and link to it from your header.php file in the section.
