NoScript bloating prefs.js
-
trypst
NoScript bloating prefs.js
Hi, I have a firefox profile that I backup regularly and I've been using for almost 10 years. In time I learned to keep it clean and I never had a problem with it.
When I uninstall an addon I delete the renmants left in the preferences, but now my prefs.js file measures almost 400kb. If I delete the thousands of sites of the trusted and untrusted lists it returns to a normal dimension (80kb).
So I have 2 questions:
1. Is there any (fast) way to clear the lists of long-dead websites?
2. Since a lighter prefs.js means faster loading and less chance of corruption, wouldn't be better to put the lists in a separate file?
Regards.
When I uninstall an addon I delete the renmants left in the preferences, but now my prefs.js file measures almost 400kb. If I delete the thousands of sites of the trusted and untrusted lists it returns to a normal dimension (80kb).
So I have 2 questions:
1. Is there any (fast) way to clear the lists of long-dead websites?
2. Since a lighter prefs.js means faster loading and less chance of corruption, wouldn't be better to put the lists in a separate file?
Regards.
Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0
Re: NoScript bloating prefs.js
> my prefs.js file measures almost 400kb
I would think that to be atypical, but who knows?
Certainly would be for me.
viewtopic.php?f=10&t=19919
That said, I'd agree that many extensions would be better off with their own noscript/flashgot.js ... rather then throwing everything into prefs.js.
I would think that to be atypical, but who knows?
Certainly would be for me.
viewtopic.php?f=10&t=19919
That said, I'd agree that many extensions would be better off with their own noscript/flashgot.js ... rather then throwing everything into prefs.js.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26.1
Re: NoScript bloating prefs.js
I have looked at my Profiles. In all, the prefs.js are between 20kb and 30kb.trypst wrote:If I delete the thousands of sites of the trusted and untrusted lists it returns to a normal dimension (80kb).
I am not a typical browser, I have NoScript (NS), RequestPolicy (RP) and Classic Theme Restorer (CTR) on all my Profiles.
My Whitelists in NS and in RP are both short, I 'Temp allow' when I need to.
I do most of my general browsing in an Aurora Profile (this one).
I have two other Aurora Profiles for special tasks: e.g. I use one only for web mail.
I also have Release Profiles. All are very similar. All start with, when I create them,
my 'standard short Whitelists' (for NS and RP). I Import these (I'll say more below).
With the 'special tasks' Profiles I use a different colour for the "Active Tab",
set using Classic Theme Restorer (CTR), to remind me which Profile I'm using.
I start all my Profiles using a short cut to use the correct Profile e.g. for Profile "20-TestNR" to use
Code: Select all
C:\Users\UserNameHere\AppData\Roaming\Mozilla\Firefox\Profiles\v0kx56co.20-TestNRThe short cut properties would be (for Windows 7 64 bit OS, using Firefox 32 bit):
Code: Select all
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -profile
"C:\Users\UserNameHere\AppData\Roaming\Mozilla\Firefox\Profiles\v0kx56co.20-TestNR" -no-remoteSee also:
Starting your Mozilla application with a specified profile
http://kb.mozillazine.org/Starting_your ... ed_profile
So do I.trypst wrote:Hi, I have a firefox profile that I backup regularly and I've been using for almost 10 years. In time I learned to keep it clean and I never had a problem with it.
I also backup my Noscript Settings.
Noscript Options, General (Tab), Export ==> Exports all your NoScript Settings.
NoScript Options, Whitelist (Tab), Export ==> Exports just your Whitelist.
Both RequestPolicy and Classic Theme Restorer also have 'Export Settings' type functions.
All 3 Add-ons use simple text files for these Settings.
If I want a new Profile, to try something out, I make a new Profile.
Then I add NS, RP and CTR.
Then I Import the Settings (from the TXT files).
I can then try other add-ons, other Settings etc.
I've not done this so at your own risk you might be abletrypst wrote:So I have 2 questions:
1. Is there any (fast) way to clear the lists of long-dead websites?
to 'hack the Exported Settings' and then Import them.
IIRC, from reading here, the 'Import' of the Whitelist ADDS to the Whitelist.
So, suppose you want to keep the untrusted list but just have a new short Whitelist.
Here is my idea of one way you could do this:
First,
backup your NoScript Settings and Whitelist:
Noscript Options, General (Tab), Export ==> Exports all your NoScript Settings.
Let us call this file "Main-Profile-NS-Options-Settings.txt".
NoScript Options, Whitelist (Tab), Export ==> Exports just your Whitelist.
Let us call this file "Main-Profile-NS-Whitelist.txt".
Second,
set up a new Profile "2".
Make a shortcut, with the "-no-remote" switch, so that you can run it at the
same time as your Main Profile.
Add NS.
Adjust the Whitelist (so that you can check what you have done).
Also make at least one change to the NS Settings.
By adjust the Whitelist, I suggest removing some of the default domains.
Also, make at least one "Untrusted" item.
For example you could remove all the paypal entries from the Whitelist.
For example you could make paypal Untrusted.
This Whitelist will be much shorter than your 'built up over time' Whitelist.
My 'default NS Whitelist' is less than 1kb.
Let us call this Export file "2-short-NS-Whitelist.txt".
Also Export the NS Settings to "2-short-NS-Options-Settings.txt".
Third,
set up another new Profile "3", with a shortcut for it as well.
Add NS.
Remove all the white list, there are some 'grey items' that you can't remove, and then
Import the Whitelist from "2-short-NS-Whitelist.txt".
Now, you will only have the "2" Whitelist (with no paypal).
You will not have the 'changed Settings' from "2".
If you look at
"Main-Profile-NS-Options-Settings.txt" and
"Main-Profile-NS-Whitelist.txt" you will see that all of the Whitelist is
in the "Main-Profile-NS-Options-Settings.txt".
It will be very near the end.
Look also at
"2-short-NS-Options-Settings.txt" and
"2-short-NS-Whitelist.txt", which might be easier.
I expect that, in the Settings file "2-short-NS-Options-Settings.txt"
the Whitelist will start with:
Code: Select all
"whitelist":"addons.mozilla.org ... Code: Select all
... moz-safe-about: resource:",Code: Select all
... moz-safe-about: resource:",Code: Select all
[UNTRUSTED]In "2-short-NS-Options-Settings.txt" it is in another place
(away from the Whitelist) called:
Code: Select all
"untrusted":"paypal.com ... Edit "Main-Profile-NS-Options-Settings.txt", by following these steps:
1. Find the place where it says:
Code: Select all
"whitelist":"addons.mozilla.org ... Code: Select all
... moz-safe-about: resource:",all of the 'short Whitelist' (i.e. all the text before[UNTRUSTED]).
4. check that it still has
Code: Select all
... moz-safe-about: resource:",5. Save this as "Main-Profile-NS-Options-Settings-with-short-Whitelist.txt".
6. Now using Profile "3", use NS and Import the Settings from "Main-Profile-NS-Options-Settings-with-short-Whitelist.txt".
7. Check if you get the results you were hoping for.
Are the NS Settings, in Profile "3" the same as your Main Profile?
Is the Whitelist in Profile "3" now like Profile "2"?
8. I would also Export again as, e.g.:
"3-Settings-after-Import.txt"
"3-Whitelist-after-Import.txt"
Then check the untrusted in the "3-Settings-after-Inport.txt" e.g.
Code: Select all
"untrusted":"domain-not-trusted.com ... and the untrusted in the "3-Whitelist-after-Import.txt"
Code: Select all
[UNTRUSTED]Note:
In "2-short-NS-Options-Settings.txt" each line ends with [CR][LF]
In "2-short-NS-Whitelist.txt" each domain is separated from the next with [LF]
Windows Notepad might not be a good enough Text editor, you might need to use
Notepad++
http://notepad-plus-plus.org
What I'm confident will work is to omit step 3.
So you 'cut out the very large white list' (step 2).
Then, instead of pasting in from "2-short-NS-Whitelist.txt"
just Import the "2-short-NS-Whitelist.txt".
However, I think this might delete your 'Untrusted list'.
I don't know, I don't use Untrusted (I'm blocking a lot with RP).
However, as the Import of the Whitelist is 'adding' it might not replace the "3" Profile's untrusted list.
Once you have verified what works you might try this method on yet another new
Profile. You can then add other Add-ons, copy items from your old Profile
(e.g. "places.sqlite" for history).
Going forward, I recommend just 'Temp allowing' for most sites.
Your Whitelist (and prefs.js) will stay small.
DJ-Leith
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
Re: NoScript bloating prefs.js
easier way to do essentially the same thing as DJ-Leith suggested (Warning: I haven't done any of this myself either, so I can't guarantee what exactly the effect would be. Backup your entire profile directory before proceeding.):DJ-Leith wrote:I've not done this so at your own risk you might be abletrypst wrote:So I have 2 questions:
1. Is there any (fast) way to clear the lists of long-dead websites?
create a new profile, go
about:config -> copy value of the pref "capability.policy.maonoscript.sites"
then go back the original profile and go
about:config -> set capability.policy.maonoscript.sites to the value copied from the clean profile
(may or may not need to restart browser for that to take effect)
also, FWIW my [seamonkey] prefs.js is 63kb atm (it was originally copied from a firefox profile that had different extensions, but I've previously gone through about:config and cleaned out some old/useless prefs a few times)
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; OpenBSD amd64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
-
trypst
Re: NoScript bloating prefs.js
All right, thanks to all those of you that answered my question.
That said, maybe I should have been more specific. If I wanted to reset all the lists I could do it in ten seconds: all it takes is to delete "noscript.untrusted" and "capability.policy.maonoscript.sites" from pref.js or reset it from about:config. I already did that in a test copy of my profile and that's how I reduced the dimension to 80kb (which is still big, but that's due to a number of keyconfig scripts).
What I want is a way to export the list and automatically clean it ONLY of dead and no longer valid websites (which I'm sure are quite a bit of entries over years of use) and see if it makes a difference. I doubt that it's possible, but if I reset all to default then I have to spend weeks to rebuild the lists, and that is annoying work.
Thanks again. Bye.
That said, maybe I should have been more specific. If I wanted to reset all the lists I could do it in ten seconds: all it takes is to delete "noscript.untrusted" and "capability.policy.maonoscript.sites" from pref.js or reset it from about:config. I already did that in a test copy of my profile and that's how I reduced the dimension to 80kb (which is still big, but that's due to a number of keyconfig scripts).
What I want is a way to export the list and automatically clean it ONLY of dead and no longer valid websites (which I'm sure are quite a bit of entries over years of use) and see if it makes a difference. I doubt that it's possible, but if I reset all to default then I have to spend weeks to rebuild the lists, and that is annoying work.
Thanks again. Bye.
Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0
Re: NoScript bloating prefs.js
? Bulk URL Checker
https://www.google.com/search?q=bulk+url+validator&btnG=Search&oe=utf-8&rls=org.mozilla%3Aen-US%3Aunofficial&client=seamonkey-a
https://www.google.com/search?q=bulk+url+validator&btnG=Search&oe=utf-8&rls=org.mozilla%3Aen-US%3Aunofficial&client=seamonkey-a
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26.1
-
Deadlinks
Re: NoScript bloating prefs.js
[quote="therube"]
?Bulk checker
This is supported and checks links using various formats, with your own network - so dns flakiness is controlled for, and you can avoid free website door nazis
?Bulk checker
This is supported and checks links using various formats, with your own network - so dns flakiness is controlled for, and you can avoid free website door nazis
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26.1
Re: NoScript bloating prefs.js
I have done some tests, it took some time and I won't trouble you all the results.
First, as barbaz pointed out above, it is much easier and quicker to:
A. Backup your Profile (for safety).
B. Copy your Profile: it will have all your Add-ons and settings.
B1. If, like me, you are using -no-remote switch also copy the shortcut and edit the properties it to point to the copy Profile.
C. Change the prefs.js (directly or using the GUI).
D. Then, while neither pref.js is in use, copy the
'improved white list'
to the 'pref.js you want to use in your normal Profile'.
If you want to copy the NoScript Untrusted list it is
Splitting up post to circumnavigate the spam filter.
continued ...
First, as barbaz pointed out above, it is much easier and quicker to:
A. Backup your Profile (for safety).
B. Copy your Profile: it will have all your Add-ons and settings.
B1. If, like me, you are using -no-remote switch also copy the shortcut and edit the properties it to point to the copy Profile.
C. Change the prefs.js (directly or using the GUI).
D. Then, while neither pref.js is in use, copy the
'improved white list'
Code: Select all
user_pref("capability.policy.maonoscript.sites", "addons.mozilla.org ...If you want to copy the NoScript Untrusted list it is
Code: Select all
user_pref("noscript.untrusted", "site-i-do-not-trust.com ... ");continued ...
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
Re: NoScript bloating prefs.js
Part 2 of 5.
Tests
T1.
How can I keep my Untrusted list but have a short Whitelist?
First, do A and B (above).
Several ways work.
T1-A.
trypst's method is quick.
It is quite easy to delete any domains that you don't want before you continue.
T1-B.
Edit the 'copy Profile prefs.js' to become
Then start the Firefox, using the copy Profile, and Import a previously exported short NoScript Whitelist.
T2.
What happens when you Import a previously exported 'short NoScript Whitelist'?
Quite a lot of Good News here:
First, the Whitelist Imports are additive
and they can Import the Untrusted list as well as Whitelist.
So, suppose you have done A, B and T1-B (above).
Also make your Copy Profile have no Untrusted domains.
This gives you a 'clean start'.
If your previously exported NoScript Whitelist has some Untrusted entries they are Imported along
with the Whitelist.
If you then Import a Whitelist 'on top of the current settings' new Whitelist entries, form the Import, are added.
Any duplicate entries are safely ignored and you end up with a bigger list.
If there is a conflict between a domain that is in the Whitelist and the Untrusted list the
Whitelist wins. This is very good.
continued ...
Tests
T1.
How can I keep my Untrusted list but have a short Whitelist?
First, do A and B (above).
Several ways work.
T1-A.
trypst's method is quick.
You end up with the NoScript default Whitelist.trypst wrote: ... all it takes is to delete "noscript.untrusted" and "capability.policy.maonoscript.sites" from pref.js or
reset it from about:config. I already did that in a test copy of my profile and that's how I reduced the dimension to 80kb ...
It is quite easy to delete any domains that you don't want before you continue.
T1-B.
Edit the 'copy Profile prefs.js' to become
Code: Select all
user_pref("capability.policy.maonoscript.sites", "addons.mozilla.org moz-safe-about: resource:");T2.
What happens when you Import a previously exported 'short NoScript Whitelist'?
Quite a lot of Good News here:
First, the Whitelist Imports are additive
and they can Import the Untrusted list as well as Whitelist.
So, suppose you have done A, B and T1-B (above).
Also make your Copy Profile have no Untrusted domains.
Code: Select all
user_pref("noscript.untrusted", "");If your previously exported NoScript Whitelist has some Untrusted entries they are Imported along
with the Whitelist.
If you then Import a Whitelist 'on top of the current settings' new Whitelist entries, form the Import, are added.
Any duplicate entries are safely ignored and you end up with a bigger list.
If there is a conflict between a domain that is in the Whitelist and the Untrusted list the
Whitelist wins. This is very good.
continued ...
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
Re: NoScript bloating prefs.js
Part 3 of 5.
It is this next part that was causing the spam filter to trigger.
I have edited the
sections.
Conflict between Untrusted list and Whitelist while Importing - Results
I had to do this several times, and with several very short 'previously exported Whitelists' (and doing the Imports in different
orders) to double check my observations.
After doing A, B, B1 and T1-B the Untrusted list was empty and there was a very short Whitelist.
I did one Import.
"prefs - Copy - after zero by EDIT and then Import 20140810-js.txt" has:
then 7 domains
and
The Untrusted list was still empty.
Note persona is in the Whitelist and youtube is not.
continued ...
It is this next part that was causing the spam filter to trigger.
I have edited the
Code: Select all
user_pref("capability.policy.maonoscript.sites", "addons.mozilla.org ... Conflict between Untrusted list and Whitelist while Importing - Results
I had to do this several times, and with several very short 'previously exported Whitelists' (and doing the Imports in different
orders) to double check my observations.
After doing A, B, B1 and T1-B the Untrusted list was empty and there was a very short Whitelist.
I did one Import.
"prefs - Copy - after zero by EDIT and then Import 20140810-js.txt" has:
Code: Select all
user_pref("capability.policy.maonoscript.sites", "addons.mozilla.org flashgot.net ... Code: Select all
... persona.org about: about:addons about:blank ... then more about and then https finishing ... https://persona.org moz-safe-about: resource:");Code: Select all
user_pref("noscript.untrusted", "");Note persona is in the Whitelist and youtube is not.
continued ...
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
Re: NoScript bloating prefs.js
Part 4 of 5.
When I then Imported this 'previously exported Whitelist' which included youtube BUT persona is UNTRUSTED:
then the https versions youtube and ytimg, then the untrusted section (about persona).
The filter did NOT like this!
Result
I got youtube and ytimg were added to the Whitelist.
and
So persona is still in the Whitelist and it has NOT been put in the Untrusted list.
continued ...
When I then Imported this 'previously exported Whitelist' which included youtube BUT persona is UNTRUSTED:
Code: Select all
addons.mozilla.orgyoutube.comytimg.comabout:blankhttp://youtube.comhttp://ytimg.com ... The filter did NOT like this!
Result
I got youtube and ytimg were added to the Whitelist.
and
Code: Select all
user_pref("noscript.untrusted", "");continued ...
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
Re: NoScript bloating prefs.js
Part 5 of 5.
If I 'start from clean' and do the 2nd import first (just above in part 4).
persona is put into the Untrusted list:
I can then do other Whitelist Imports. As long as they do not include persona the Untrusted will still have persona.
Once I Import a Whitelist that does include persona it is Added to the Whitelist AND ALSO deleted from the Untrusted list.
Just what most people would want.
Yet another example of Giorgio's wonderful care and attention.
DJ-Leith
If I 'start from clean' and do the 2nd import first (just above in part 4).
persona is put into the Untrusted list:
Code: Select all
user_pref("noscript.untrusted", "persona.org http://persona.org https://persona.org");Once I Import a Whitelist that does include persona it is Added to the Whitelist AND ALSO deleted from the Untrusted list.
Just what most people would want.
Yet another example of Giorgio's wonderful care and attention.
DJ-Leith
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
-
trypst
Re: NoScript bloating prefs.js
Thanks, I really think I'll try those two.Deadlinks wrote:therube wrote: ?Bulk checker
This is supported and checks links using various formats, with your own network - so dns flakiness is controlled for, and you can avoid free website door nazis
Sadly I will have to pospone for some time since it seems that my HD is suddenly in the process of self-destructing. I will have an excuse to install Windows 7 (surely not 8) after all. I don't really look forward to it. Hate to reinstall all programs and tweaks preferences.
Thanks again. Bye.
Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0
Re: NoScript bloating prefs.js
Let me know via PM if you want any help with alternatives to Windows. Microsoft doesn't build the best mousetrap; it just has the best marketing.trypst wrote: Sadly I will have to pospone for some time since it seems that my HD is suddenly in the process of self-destructing. I will have an excuse to install Windows 7 (surely not 8) after all. I don't really look forward to it. Hate to reinstall all programs and tweaks preferences.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0
Re: NoScript bloating prefs.js
Does that offer extend to others (who may be more knowledgeable of Unix than trypst) too?Thrawn wrote:Let me know via PM if you want any help with alternatives to Windows.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:30.0) Gecko/20100101 Firefox/30.0 SeaMonkey/2.27a2