AdBlockPlus blocks mod_pagespeed's defer js

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
pratham
Posts: 1
Joined: Sat Apr 25, 2015 10:36 am

AdBlockPlus blocks mod_pagespeed's defer js

Post 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.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: AdBlockPlus blocks mod_pagespeed's defer js

Post 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
lewisje
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: AdBlockPlus blocks mod_pagespeed's defer js

Post 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.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Rotate
Posts: 5
Joined: Fri Aug 07, 2015 10:11 pm

Re: AdBlockPlus blocks mod_pagespeed's defer js

Post 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?
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: AdBlockPlus blocks mod_pagespeed's defer js

Post by mapx »

example sites ?
as I said above you could ask directly to easylist support forum
Rotate
Posts: 5
Joined: Fri Aug 07, 2015 10:11 pm

Re: AdBlockPlus blocks mod_pagespeed's defer js

Post 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.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: AdBlockPlus blocks mod_pagespeed's defer js

Post 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
Rotate
Posts: 5
Joined: Fri Aug 07, 2015 10:11 pm

Re: AdBlockPlus blocks mod_pagespeed's defer js

Post 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.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: AdBlockPlus blocks mod_pagespeed's defer js

Post by mapx »

You could also file an issue on the bug tracker, could be the devs will investigate the issue
https://issues.adblockplus.org
Locked