Loading many js files with head.js. Adblock blocks adsense script, that sends the page on an infinite loading loop

286 Views Asked by At

I'm trying to load a bunch of javascripts with head.js. I'm also loading Google Adsense javascript file with headjs.

When I have AdBlock on and try to refresh the page (from browser cache) it keeps loading forever. I can see in the inspector that the adblock script has failed to load, and all my other scripts are pending.

Funny thing is some of the scripts have loaded already, and those have already been rendered, even though it says pending. The rest of the scripts have not finished loading yet but head.ready fired already, which isn't supposed to happen until all the scripts have finished loading. The code dependent on those files are throwing up errors.

On hard reloads the page load fine. From browser cache the page loads fine, the second time around. It's the first load from browser cache that's causing me trouble.

Here's my inspector, I'd greatly appreciate any and all help :)

You can see my inspector here:

0

There are 0 best solutions below