Hacker News new | ask | show | jobs
by zamadatix 2497 days ago
The 1 MB limit bug report gets on a certain nerve of mine, "I don't think it'd be fast so no need to change the limit just do these things that'll make it slower anyways".

There might be an easy way around all of this though, the problem is that the URLs used START encoded. If you just sourced the raw list and in the extension live ran it through https://github.com/pieroxy/lz-string/blob/master/libs/lz-str... to output the lz compressed pac file to disk (you'll need the filesystem write permission on the extension) and attach that lz-string library at the end and call it to decompress (similar to how you do now just not manual) it's probably a win-win.

I say win-win because on your side the lz compression will probably net a file ~10x smaller than what you have now at the same decode speed and on Google's side the URLs used are stored a form they can validate against.

1 comments

I've actually found a workaround in the extensions API -- bypassing the script via `data` field instead of an url doesn't have 1MB restriction. The reason we compress the script is that it is used not only inside this extension but also in settings of other browsers/OSes (e.g. Internet Explorer, Windows system settings, chromium CLI flag `--proxy-pac-url`).