https://github.com/zimbatm/publicsuffix.js
JavaScript version of the Public Suffix List
https://github.com/zimbatm/publicsuffix.js
Last synced: 11 months ago
JSON representation
JavaScript version of the Public Suffix List
- Host: GitHub
- URL: https://github.com/zimbatm/publicsuffix.js
- Owner: zimbatm
- Created: 2010-09-19T21:04:56.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:21:50.000Z (over 2 years ago)
- Last Synced: 2025-07-13T10:52:05.859Z (12 months ago)
- Language: JavaScript
- Homepage: http://publicsuffix.org/
- Size: 38.1 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
publicsuffix-js
===============
WARNING: the current algorithm is broken but I don't have time to fix it up yet.
Instead of lots of regexpes, domains should be split on the doc ('.') character
and looked-up in a hash tree. If you have time to fix this, please let me know :-p
Implements the algorithm to distinguish separate domains (for example browsers
need to know that for their cookies and authorization models). Unfortunately
there is no better algorithm than looking-up a published list.
See http://publicsuffix.org/ for more details.
Have fun,
Jonas
Licence
-------
All code of this project is in public domain.
It is assumed that contributors loose their copyrights on code they contribute.
See http://unlicence.org for more details.
Ideas for later (or if you want to help)
---------------
* Changing the list to a reverse hash tree could be more space efficient.
Lookup would maybe also be faster, but there is not efficiency problem for
me.
A hash tree like {uk: {co: ...
* Provide a mean to update the list at runtime. It's hard to do that in the browser though.