RndPhrase icon indicating copy to clipboard operation
RndPhrase copied to clipboard

Load mozilla prefix list dynamically

Open rlindsgaard opened this issue 11 years ago • 5 comments

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

rlindsgaard avatar Jul 20 '13 16:07 rlindsgaard

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?

Munter avatar Jul 21 '13 10:07 Munter

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

rlindsgaard avatar Jul 21 '13 10:07 rlindsgaard

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 avatar Jun 17 '16 12:06 edmorley

@edmorley Would https://publicsuffix.org/list/public_suffix_list.dat be a good trusted and stable place to fetch it from?

Munter avatar Jun 19 '16 11:06 Munter

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

Munter avatar Jun 19 '16 14:06 Munter