Page 1 of 1

AdBlockPlus blocks mod_pagespeed's defer js

Posted: Sat Apr 25, 2015 11:01 am
by pratham
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'

Code: Select all

<script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>
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..

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>
/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.

Re: AdBlockPlus blocks mod_pagespeed's defer js

Posted: Sat Apr 25, 2015 11:13 am
by mapx
I guess you could ask directly at the easylist support forum
http://forums.lanik.us/

but they will ask you which is the page / site in trouble

Re: AdBlockPlus blocks mod_pagespeed's defer js

Posted: Sun Apr 26, 2015 6:54 am
by lewisje
ABP doesn't look into the ad-related Javascript, it just blocks or allows based on the patterns in the URLs themselves; I'd like to see an example page where this happens, along with what subscriptions you use, to see whether any of the subscriptions has a blocking rule triggered by PageSpeed-deferred Javascript URLs.

Re: AdBlockPlus blocks mod_pagespeed's defer js

Posted: Fri Aug 07, 2015 10:16 pm
by Rotate
Have the same issue. When I enable "ModPagespeedEnableFilters defer_javascript ", the page is going really fast.
I win the Page Speed ​​Insights Score added +30 points .
Unfortunately, there is then a few problems :

Chrome with active Adblocker plugin didn't render the page completly. It hangs in process ("waiting for Adblocker Plus" in the status bar.
In FireFox the problem doesn't occur with active AdBlocker.

With deactivated Adblocker everything is fine in Chrome and FF.
In Safari on iOS (eg iPhone) the page will depend also.

Anyone got a solution?

Re: AdBlockPlus blocks mod_pagespeed's defer js

Posted: Fri Aug 07, 2015 10:28 pm
by mapx
example sites ?
as I said above you could ask directly to easylist support forum

Re: AdBlockPlus blocks mod_pagespeed's defer js

Posted: Fri Aug 07, 2015 11:15 pm
by Rotate
ModPagespeedEnableFilters defer_javascript
is now enabled. Take a look at this article-site: http://www.dance-charts.de/201508075831 ... ok-of-love
Soundcloud-player, disqus and several other elements won't be loaded with active AdBlocker Plus in Chrome.
Please let me know, when you checked it. I'm going to deactivate defer_javascript.

Re: AdBlockPlus blocks mod_pagespeed's defer js

Posted: Fri Aug 07, 2015 11:41 pm
by mapx
it seems to be some wrong integration between pagespeed and chrome / scripts used by that page.
If I whitelist some filters randomly the page is correctly rendered.

Did you search for some issue with pagespeed stuff ? perhaps here: https://code.google.com/p/page-speed/issues/list

Re: AdBlockPlus blocks mod_pagespeed's defer js

Posted: Fri Aug 07, 2015 11:45 pm
by Rotate
Thanks for the informations.
No, I'm not a programmer. Only the site-owner with very small knowleage in stuff like that.
I'll take a look at the link you posted.

Re: AdBlockPlus blocks mod_pagespeed's defer js

Posted: Fri Aug 07, 2015 11:47 pm
by mapx
You could also file an issue on the bug tracker, could be the devs will investigate the issue
https://issues.adblockplus.org