AdBlockPlus blocks mod_pagespeed's defer js
Posted: Sat Apr 25, 2015 11:01 am
Before I begin, this is not me complaining. I just want to understand how AdBlock processes javascript a bit.
I just found that AdBlockPlus blocks mod_pagespeed's Defer JS's javascript from processing if the page has a google ad and the status bar on chrome keeps displaying 'Waiting for AdBlockPlus'
Defer JS defers javascript by converting script tabs into something like this and then loads them at the end of the page.. but the problem is other important scripts never run as well..
/pagespeed_static/js_defer.??????????.js (The question marks are just a randomly generated value by mod pagespeed)
net::ERR_BLOCKED_BY_CLIENT
Content of js_defer.??????????.js
http://pastebin.com/2ue484i6
What I think is happening is that AdBlockPlus blocks the defer js script when it tries to process the javascript related to the Ads and this is causing other non-ad related javascripts to not load.
Please let me know if you feel the above is right.
To counter that I could simply ask mod_pagespeed to ignore the ad related javascript by adding pagespeed_no_defer="" to the script tag I guess.
I can't provide actual links to the site to experiment on as I have temporarily disabled mod_pagespeed to sort out some issues.
I just found that AdBlockPlus blocks mod_pagespeed's Defer JS's javascript from processing if the page has a google ad and the status bar on chrome keeps displaying 'Waiting for AdBlockPlus'
Code: Select all
<script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>
Code: Select all
<script pagespeed_orig_type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js?beb304" type="text/psajs" orig_index="8"></script>
net::ERR_BLOCKED_BY_CLIENT
Content of js_defer.??????????.js
http://pastebin.com/2ue484i6
What I think is happening is that AdBlockPlus blocks the defer js script when it tries to process the javascript related to the Ads and this is causing other non-ad related javascripts to not load.
Please let me know if you feel the above is right.
To counter that I could simply ask mod_pagespeed to ignore the ad related javascript by adding pagespeed_no_defer="" to the script tag I guess.
I can't provide actual links to the site to experiment on as I have temporarily disabled mod_pagespeed to sort out some issues.