Skip to content

feat: support public suffix matching for domain handling - #2442

Merged
mbnuqw merged 11 commits into
mbnuqw:v5from
llc0930:publicSuffix
Aug 12, 2026
Merged

mbnuqw merged 11 commits into
mbnuqw:v5from
llc0930:publicSuffix

Conversation

@llc0930

@llc0930 llc0930 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

This PR introduces public suffix list (PSL) matching to improve domain handling, addressing the discussion outlined in w3c/webextensions#231 (comment)

@mbnuqw

mbnuqw commented Aug 12, 2026

Copy link
Copy Markdown
Owner

While the publicSuffix API is actually useful in some parts of Sidebery (including the legacy clearTabsCookies), using it in wrongly named Utils.getDomainOf (it should be renamed to getHostname) is wrong. Another problem is using heavy new URL(). The Utils.getDomainOf is used in hot paths and should rely on lightweight regexp.exec (~20x faster).

@mbnuqw
mbnuqw merged commit 468158d into mbnuqw:v5 Aug 12, 2026
2 of 3 checks passed
@llc0930
llc0930 deleted the publicSuffix branch August 12, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants