获得"净利润:: ERR_BLOCKED_BY_CLIENT"一些AJAX调用错误 [英] Getting "net::ERR_BLOCKED_BY_CLIENT" error on some AJAX calls

查看:254
本文介绍了获得"净利润:: ERR_BLOCKED_BY_CLIENT"一些AJAX调用错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我已经意识到,一些adblocker扩展(如adBlocker加)阻止某些Ajax调用。我得到这个错误在控制台上:

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 

为什么会阻止某些Ajax调用,但不是别人,是什么原因造成的?有没有什么解决办法不是告诉用户关闭adblocker其他?任何帮助将是AP preciated,在此先感谢...

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? Any help would be appreciated, thanks in advance...

推荐答案

广告拦截器通常有一些规则,也就是说,它们匹配某种类型的EX pression(有时也匹配前pressions DOM中的URI ,并不表明事项在这种情况下)。

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

有规则和EX pressions,只是在文本的一点点工作(的URI)很容易制造一些假阳性...

Having rules and expressions that just operate on a tiny bit of text (the URI) is prone to create some false-positives...

另外指示用户禁用其扩展名(至少在你的网站),你还可以得到延伸和检验规则/ EX pressions的这阻止你的东西,提供的扩展提供了有关足够的细节。一旦你确定了元凶,​​你可以尽量避免触发使用不同的URI的规则,报告规则的不正确或过于宽泛的创建它,或者两者的团队。 检查文档对于特定附加上如何做到这一点。

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.

例如,Adblock Plus的有一个过滤项目的视图,显示网页上的所有受阻的项目,并引发块的规则。而这些项目也包括XHR请求。

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.

这篇关于获得"净利润:: ERR_BLOCKED_BY_CLIENT"一些AJAX调用错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆