Getting "net::ERR_BLOCKED_BY_CLIENT" error on some AJAX calls
AjaxGoogle Chrome-ExtensionFirefox AddonAjax Problem Overview
Recently I've realised that, some adblocker extensions (such as adBlocker plus) block some Ajax calls. I get that error on the console:
GET http://localhost/prj/conn.php?q=users/list/ net::ERR_BLOCKED_BY_CLIENT
Why does it block some Ajax call but not the others and what causes that? Is there any workaround other than telling user to turn off adblocker?
Ajax Solutions
Solution 1 - Ajax
AdBlockers usually have some rules, i.e. they match the URIs against some type of expression (sometimes they also match the DOM against expressions, not that this matters in this case).
Having rules and expressions that just operate on a tiny bit of text (the URI) is prone to create some false-positives...
Besides instructing your users to disable their extensions (at least on your site) you can also get the extension and test which of the rules/expressions blocked your stuff, provided the extension provides enough details about that. Once you identified the culprit, you can either try to avoid triggering the rule by using different URIs, report the rule as incorrect or overly-broad to the team that created it, or both. Check the docs for a particular add-on on how to do that.
For example, AdBlock Plus has a Blockable items view that shows all blocked items on a page and the rules that triggered the block. And those items also including XHR requests.
Solution 2 - Ajax
If your URL contains words such as "advert", "ad", "doubleclick", "click", or something similar…
For example:
GET googleads.g.doubleclick.net/pagead/id
static.doubleclick.net/instream/ad_status.js
…Then ad-blocker will block it.
Solution 3 - Ajax
I've discovered that if the filename has 300
in it, AdBlock blocks the page and throws a ERR_BLOCKED_BY_CLIENT
error.
Solution 4 - Ajax
Add PrivacyBadger to the list of potential causes
Solution 5 - Ajax
I find a case is if your url contains the key word banner, it will blocked too.
Solution 6 - Ajax
As it has been explained here, beside of multiple extensions that perform ad or script blocking you may aware that this may happen by file names as below:
> Particularly in the AdBlock Plus the character string "-300x600" is causing the Failed to Load Resource > ERR_BLOCKED_BY_CLIENT problem.
As shown in the picture, some of the images were blocked because of the '-300x600' pattern in their name, that particular text pattern matches an expression list pattern in the AdBlock Plus.
Solution 7 - Ajax
I had sentry calls failing with this and disabling brave ads shield on Brave browser did solve the issue for me.
Solution 8 - Ajax
Solution 9 - Ajax
If there are any ad blockers (Brave browser use default blocker), turn it off. This worked for me
Solution 10 - Ajax
In my case it was a Chrome extension and Firefox add-on by Avira called "Avira Browser Safety". I had problems with version 1.7.4. In my specific case I wanted to login to a website called gliffy.com for making diagrams, but after logging in I got an blank page. If you use F12 (console) in Chrome you can see all these ERR_BLOCKED_BY_CLIENT (and other) errors.
Solution 11 - Ajax
Opera Blocker and others check all files/urls in Network. Then compares to the list. It is EasyPrivacy and EasyList. If your file/url in this, your will be ban. Good luck.
So... I find FilterLists for all addBlockers!