文章摘要
互联网广告不仅浪费用户时间,还使网络环境恶化,广告收入微薄迫使网站充斥无实质内容的广告。作者建议直接通过金钱支持喜欢的创作者,而非依赖广告。为提醒用户使用广告拦截器,作者在网站侧边添加了不遮挡内容的提示,推荐使用uBlock Origin,并指出商业广告拦截器可能存在问题。技术细节包括页面加载“nativeads.js”脚本和包含提示信息的div。
文章总结
标题:未检测到广告拦截器(Maurycy的博客)
主要内容:
互联网广告不仅浪费用户时间,还使得网络环境变得更加糟糕。广告行业的收益微薄,导致许多网站不得不充斥大量广告,而缺乏实质内容。作者建议,如果用户想支持自己喜欢的作者,直接捐款比观看广告更有帮助。
然而,大多数人仍然将广告视为互联网体验的一部分。因此,作者在网站上添加了一条提示信息:“未检测到广告拦截器。建议使用uBlock Origin等扩展程序以节省时间和带宽。点击此处关闭。” 这条信息显示在页面侧边,不会覆盖内容,且关闭按钮有效,关闭后不会再次显示。
作者特别推荐uBlock Origin,因为许多用户仅通过广告了解到广告拦截器,而商业广告拦截器往往不可靠,甚至可能是骗局。如果这些拦截器需要付费推广,它们很可能从用户身上牟利。
技术细节:
页面包含一个用于显示提示信息的div,并尝试加载名为“nativeads.js”的脚本。脚本会将实际信息插入文档中,并通过CSS使其美观显示。如果广告拦截器删除了div元素或阻止了“nativeads.js”的网络请求,提示信息将不会显示。
作者还提到,无法检测基于DNS的拦截,除非加载实际广告。因此,提示信息设计得尽量不显眼且易于关闭。此外,不支持JavaScript的浏览器不会显示该信息,因为这些浏览器本身不需要广告拦截器。
致谢:
感谢Stefan Bohacek的原始创意。作者对其进行了修改,以减少误报,并明确设置了cookie,确保提示信息只显示一次。
总结:
文章主要讨论了互联网广告的负面影响,并建议用户使用广告拦截器来改善浏览体验。作者通过技术手段在网站上添加了提示信息,并详细解释了其实现方式。
评论总结
评论内容总结:
广告拦截器的使用与网站访问者的重叠性
- WD-42 质疑使用广告拦截器的访问者与未使用者的重叠性,并提到开发者可能是有意选择不屏蔽广告。
- 引用:“I wonder what the overlap between visitors to a site that would display this and visitors not already using an adblocker is.”
- 引用:“I’ve seen developers with ads plastered all over their screens before, I’d like to believe it’s a conscious decision on their part.”
浏览器功能改进建议
- est 希望浏览器能在页面加载后禁用 JavaScript,仅在用户点击时启用。
- 引用:“I wish browsers could just provide a way to disable javascript after page
onload.” - 引用:“Perhaps only enables js when user clicks something.”
外部CSS加载失败的争议
- charrondev 反驳外部CSS加载失败的说法,认为大多数网站在没有样式表的情况下无法使用。
- 引用:“How often do you see loading a CSS stylesheet fail to load?”
- 引用:“Most sites are completely unusable without their stylesheets.”
广告拦截器对安全的积极作用
- Vortigaunt 引用FBI的观点,认为广告拦截器可以防止诈骗者将用户引导至恶意网站。
- 引用:“The FBI also makes a good argument that adblockers prevent scammers from directing people to malicious sites.”
- 引用链接:FBI ad blocker article
广告拦截器检测与反制
- userbinator 提到代理自动检测并阻止广告URL,并认为广告拦截器的检测只会加剧猫鼠游戏。
- 引用:“I found it amusing that my proxy detected the
/ads/in the URL and killed the connection automatically.” - 引用:“Of course highlighting this fact that the presence of an adblocker is detectable, unfortunately only results in escalating the cat-and-mouse game further.”
使用localStorage替代cookie的建议
- reactordev 建议使用localStorage替代cookie,以避免与cookie相关的法律问题。
- 引用:“Instead of
document.cookieconsiderdocument.localStoragesince there’s verbiage around showing a notice on your site if you use cookies, etc, for tracking purposes.”
广告拦截器的隐私与带宽优势
- neilv 支持广告拦截器,认为其能节省时间、带宽、注意力并保护隐私,同时提醒注意某些广告拦截器可能是恶意软件。
- 引用:“And attention and privacy.”
- 引用:“This notice is a great idea.”
广告支持的网站体验
- ksynwa 描述没有广告拦截器的设备浏览广告支持的网站时,感觉像进入“毒窝”,并感叹这是大多数用户的正常体验。
- 引用:“Seeing a website that is SEoptimised and heavily ad supported feels like walking into a crack den.”
- 引用:“That this is the normal experience for the vast majority of users is sad.”
广告与内容提供的社会契约
- keb_ 认为广告与内容提供之间存在一种社会契约,用户屏蔽广告可能导致服务无法持续,建议不接受这种契约的用户应寻找替代平台。
- 引用:“There is an unwritten social contract here.”
- 引用:“If people aren’t going to be polite and accept that contract then fine, enforcement was always by an honour system.”
广告拦截器检测的异常情况
- mediumsmart 提到在Orion浏览器中未显示广告拦截器检测信息,也未显示水母相关事实。
- 引用:“The message does not show on Orion and I have no adblocker installed.”
- 引用:“I was also not told any Jellyfish facts.”
div ID修改的原因
- noam_k 询问div ID被修改的原因,但未得到进一步解释。
- 引用:“Can anyone explain why the ID of the div is modified?”