RndPhrase
RndPhrase copied to clipboard
Load mozilla prefix list dynamically
Currently the list needs to be downloaded with a python script and is not updated after compile time.
Solution Write some js that caches the list and updates it, e.g. in localStorage
Do you want to load https://github.com/brinchj/RndPhrase/blob/master/data/suffix-list.js runtime or do you want to port https://github.com/brinchj/RndPhrase/blob/master/scripts/update-suffixlist.py to be done runtime by each client?
It would be great to load ttp://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1 at runtime by each client, so the list is always updated
Mozilla's MXR site is down and likely not coming back (see https://bugzilla.mozilla.org/show_bug.cgi?id=1279952).
However even when up, it should not be used to pull from as part of a build/automation anyway - it's a code indexer, not a source code repository. (And particularly not over plain HTTP!)
If needs be use hg.mozilla.org and the hgweb /raw/ path.
@edmorley Would https://publicsuffix.org/list/public_suffix_list.dat be a good trusted and stable place to fetch it from?
These are candidates for replacing the current python script with javascript runtime updated suffix lists from Mozillas official publicsuffix list:
https://www.npmjs.com/package/publicsuffixlist https://www.npmjs.com/package/psl https://www.npmjs.com/package/tldjs
I have only looked at the README for the API. Not inspected the code for them