在某些AJAX调用中出现“ net :: ERR_BLOCKED_BY_CLIENT”错误


                    

最近我已经意识到,一些adblocker扩展(例如adBlocker plus)会阻止一些Ajax调用。 我在控制台上收到该错误:</ p>

  GET http://localhost/prj/conn.php?q = users / list / net :: ERR_BLOCKED_BY_CLIENT
</ code> </ pre>

为什么阻止某些Ajax调用而不阻止其他Ajax调用,是什么原因造成的? 除了告诉用户关闭adblocker之外,还有其他解决方法吗?</ p>
     </ div>

展开原文

原文

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?

8个回答


AdBlocker通常具有一些规则,即,它们将URI与某种表达式匹配(有时,它们也将DOM与表达式匹配,在这种情况下并不重要)。</ p>

具有仅对少量文本(URI)起作用的规则和表达式就容易产生一些假阳性... </ p>

除了指示用户禁用扩展名(至少在您的网站上),您还可以获取扩展名并测试哪些规则/表达式阻止了您的工作,只要扩展名提供了足够的详细信息。 一旦确定了罪魁祸首,您可以尝试通过使用不同的URI来避免触发规则,向创建它的团队报告该规则不正确或过于宽泛,或者两者兼而有之。
在文档中查看有关如何执行此操作的特定加载项。</ p>

例如,AdBlock Plus具有一个可阻止项目</ em>视图,该视图显示页面上所有被阻止的项目以及触发该阻止的规则。 这些项目还包括XHR请求。</ p>

“可阻止的项目” </ p>
     </ div>

展开原文

原文

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.

Blockable items


因为它已经 多个扩展名</ em> <之外,nofollow noreferrer“> 在这里解释</ em> / a>执行广告或脚本阻止,您可能会意识到,这可能是由 文件名</ em> </ strong>引起的,如下所示:</ p>


  

尤其是在 AdBlock Plus </ strong>中,字符串“ -300x600 </ strong>”导致加载资源失败
   ERR_BLOCKED_BY_CLIENT问题。</ p>
</ blockquote>

如图所示,某些图像因名称中的“ -300x600”模式而被阻止,该特定文本模式 与AdBlock Plus中的表达式列表模式匹配</ em> </ strong>。</ p>

“ </ p>
     </ div>

展开原文

原文

As it has been expained 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.

ERR_BLOCKED_BY_CLIENT problem


我发现,如果文件名中包含 300 </ code>,则AdBlock会阻止页面并引发 ERR_BLOCKED_BY_CLIENT </ code>错误。</ p>
     </ div>

展开原文

原文

I've discovered that if the filename has 300 in it, AdBlock blocks the page and throws a ERR_BLOCKED_BY_CLIENT error.


PrivacyBadger 添加到潜在原因列表中</ p>
     </ div>

展开原文

原文

Add PrivacyBadger to the list of potential causes


我发现一种情况是,如果您的网址包含关键字“横幅”,它也会被屏蔽。</ p>
     </ div>

展开原文

原文

I find a case is if your url contains the key word "banner", it will blocked too.


如果您的URL包含诸如“ advert”,“ ad”,“ doubleclick”,“ click”或类似内容之类的字词……</ p>

例如:</ em> </ p>


  • 获取googleads.g.doubleclick.net/pagead/id </ li>
  • static.doubleclick.net/instream/ad_status.js </ code> </ li>
    </ ul>

    ...然后,广告拦截器将对其进行拦截。</ p>
         </ div>

展开原文

原文

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.


在我的情况下,这是Avira的Chrome扩展程序和Firefox附加程序,称为“ Avira Browser Safety”。 我在1.7.4版中遇到了问题。
在我的特定情况下,我想登录一个名为 gliffy.com 的网站来制作图表,但登录后却出现空白 页。 如果您在Chrome中使用F12(控制台),则可以看到所有这些ERR_BLOCKED_BY_CLIENT(和其他)错误。</ p>
     </ div>

展开原文

原文

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.


Opera阻止程序和其他程序检查网络中的所有文件/ URL。 然后与列表进行比较。 这是EasyPrivacy和 EasyList 。 如果您的文件/ URL位于中,则将被禁止。 祝你好运。</ p>

所以...我发现所有addBlocker的过滤器列表!</ strong> </ p>
     </ div>

展开原文

原文

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!

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐