Two-label hostname shortcut merges unrelated .co.jp sites; ad-filter tool switches to Public Suffix List
A developer building a browser tool that checks ad-blocker filter rules found that the $third-party option produced wrong results. Their function treated the last two hostname labels as the site, so every .co.jp domain was grouped as one party. Testing in Node.js 24 showed that suffixes like co.jp, co.uk and github.io needed special handling, while a bare public suffix should have no owner. The author concluded that the Public Suffix List, which covers thousands of entries with wildcard and exception rules, is required for reliable third-party checks. The write-up was produced with AI assistance and describes the author's own side project.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in