Censorship, adblockers and classnames : list of "censored" keywords not to use in source code?

Viewed 61

The "problem" may not be new, but I just discovered that some css classnames are censored by either the browser (Chrome 84.0.4147.105 in my case) or its extensions (Adblock supposedly).

It has recently been the case for a cookie banner with a classname of "c-cookies" : while there was no problem on any other laptops or phones I used to test the website in question, one computer in particular completely ignored the cookie banner, not rendering it at all.

I haven't figured out why this specific laptop had such a behaviour yet (no error visible in the console), but changing the classname from "c-cookies" to "c-cks" corrected the issue.

Two questions for you : is there any documentation regarding "not-to-use" keywords ? And have you already encountered a situation like this ? Google wasn't my friend on this one, no documentation found anywhere (but my phrasing may be bad too).

1 Answers

Thank you for raising this question, as I personally was unaware of it.

After looking around a bit I found this vast list of css classes and IDs which seems to be blocked by adblocker that should preferably be avoided to overcome this problem. As per the original question, the class .c-cookies is also present on this list, so there is that. This seems to be a common problem with Adblock where it doesn't like specific CSS classes and IDs, switching off the adblocker should be a quick fix to make your website run. But for the long run, the classes mentioned in that list should be avoided. I'm not sure if the list is exhaustive though. There might be more of such vulnerabilities, but this seems to be quite the collection.

Related