简体   繁体   English

adblock是否会过滤URL中的“ ad”?

[英]Is adblock filtering on the “ad” in my URL?

I'm getting reports from users saying two of my sites are broken. 我收到用户的报告说我的两个网站都坏了。 It seems like in each case they are running adblock plus. 似乎在每种情况下他们都在运行adblock plus。 From the reports I'm getting, it seems like Javascript isn't running. 从我得到的报告中,似乎Javascript没有运行。

This is a stab in the dark, but (perhaps unfortunately) my servlets are all run from a URL that includes "/ad/" for 'Application Directory', eg. 这是一个黑暗的刺探,但是(不幸的是)我的servlet都是从包含“应用程序目录”的“ / ad /”的URL运行的。

http://www.example.com/ad/b

Anybody know if this is the sort of sledgehammer that adblock uses to do its thang? 有人知道这是adblock用来做它的大锤吗?

For those, like me, with real customers suffering under this, here is what I now know... 对于像我这样的,真正的客户在此之下受苦的人们,这就是我现在所知道的...

AdBlock uses things called 'filters' to arbitrarily block http requests. AdBlock使用称为“过滤器”的东西来任意阻止http请求。 Some/all (who knows) of these filters are defined here https://easylist.adblockplus.org/en/ 这些过滤器的部分/全部(谁知道)在此处定义https://easylist.adblockplus.org/en/

I haven't gone through them in detail, but a quick scan showed a number featuring "/ad/", as do many of my (non advertising) URLs. 我没有详细介绍它们,但是快速扫描显示出一个数字带有“ / ad /”,我的许多(非广告)URL也是如此。 It seems AdBlock and/or the filter maintainers are on a crusade to block as many ads as possible, regardless of the collateral damage. 似乎AdBlock和/或过滤器维护人员正在竭力阻止尽可能多的广告,而不论附带损害如何。 I'm guessing they watch too many action movies. 我猜他们看太多的动作片了。 I'm neither pro nor con ads, but I am uber con third parties silently destroying my work. 我既不是专业广告也不是骗人的广告,但我是超级骗子,第三方在默默地破坏我的工作。 So yay Google for banning this crap from Chrome web store. 因此,是的,Google禁止Chrome网上商店中的此类废话。

Actually it happens with 4shared also if u use adblock and when u go to download page the page becomes static ie no response on any click 实际上,如果您使用adblock,并且在您下载页面时页面也变为4shared,则页面变为静态,即任何点击均无响应

How ad-blockers work 广告拦截器的工作原理

Ad blockers are content filters that rely on predefined filter lists to identify and remove ads. 广告拦截器是内容过滤器,它依赖于预定义的过滤器列表来识别和删除广告。 They work by compiling lists of expressions associated with ads and using pattern matching to compare those against outgoing requests made by the user's browser. 它们通过编译与广告关联的表达式列表并使用模式匹配将这些表达式与用户浏览器发出的传出请求进行比较来进行工作。

Ad blockers may also block tracking scripts, which in turn prevent third-party ad networks from delivering ads to a user's browser by way of the publisher's site. 广告拦截器还可以拦截跟踪脚本,从而阻止第三方广告网络通过发布者的网站将广告投放到用户的浏览器。 "Before the page is rendered, Adblock Plus modifies it, strips off the request to the ad service or tracking scripts and injects CSS to repair the site so it doesn't look broken," says Till Faida, president of Adblock Plus. Adblock Plus总裁Till Faida说:“在呈现页面之前,Adblock Plus对其进行了修改,将请求剥离到广告服务或跟踪脚本中,并注入CSS来修复该网站,以使它看起来不会损坏。”

Think of it as surgically removing the ads and then closing up the holes. 可以认为这是通过外科手术去除广告,然后关闭孔。 To the user there's no evidence an ad ever existed. 对于用户而言,没有证据表明存在广告。

Because they interrupt communications with third-party ad networks, dedicated tracking blockers such as Disconnect also block ads from those sources. 由于它们会中断与第三方广告网络的通信,因此专用的跟踪阻止程序(例如Disconnect)也会阻止来自这些来源的广告。 Disconnect does so by examining the host name for any outgoing browser request and blocking requests to hosts associated with ad networks that track users' activity across the Web. 断开连接的方法是检查主机名是否有任何传出的浏览器请求,并阻止对与跟踪用户网络活动的广告网络相关联的主机的请求。 But the intent is to block tracking, not ads, says co-CEO Casey Oppenheim, and these tools still let through "first-party" ads produced by the publisher. 但联合首席执行官Casey Oppenheim说,这样做的目的是阻止跟踪,而不是广告,并且这些工具仍然允许发布者制作的“第一方”广告通过。

What does Adblock do, what did Adblock Plus 0.5/0.6 do? Adblock可以做什么,Adblock Plus 0.5 / 0.6可以做什么? They all used the trivial algoritm: 他们都使用了琐碎的算法:

function getMatchingFilter1(S, F)
  for each filter in F
    if (filter matches S)
      return filter
    end if
  end for

  return null
end function

so your string S is matching filter that is what causing error. 因此您的字符串S是匹配过滤器,这是导致错误的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM