bookmarks.html bloated with binary favicon data
- richey
- Posts: 17
- Joined: December 27th, 2006, 10:27 am
- Contact:
bookmarks.html bloated with binary favicon data
Hello,
is it possible to prevent FF from saving favicon data in the bookmarks.html file?
This is really annoing, I'm working on a USB stick and the bookmark file grows by 2-6kb with every bookmark I save or view... not to speak that loading takes considerably longer. My bookmark file is already 2 MB, and growing every day.
Thanks!
r.
is it possible to prevent FF from saving favicon data in the bookmarks.html file?
This is really annoing, I'm working on a USB stick and the bookmark file grows by 2-6kb with every bookmark I save or view... not to speak that loading takes considerably longer. My bookmark file is already 2 MB, and growing every day.
Thanks!
r.
- RaiseMachine
- Posts: 1764
- Joined: December 6th, 2004, 6:05 pm
- Location: England
about:config -> Set both of these to false
Code: Select all
browser.chrome.favicons
browser.chrome.site_icons
"Doesn't the idea of making nature against the law seem to you a bit... unnatural ?" - Bill Hicks
"Money is the Schrodinger's Cat of economics." - Robert Anton Wilson
"It's not a bug, it's two features having a fight in the pub car-park." - Me
"Money is the Schrodinger's Cat of economics." - Robert Anton Wilson
"It's not a bug, it's two features having a fight in the pub car-park." - Me
- richey
- Posts: 17
- Joined: December 27th, 2006, 10:27 am
- Contact:
- richey
- Posts: 17
- Joined: December 27th, 2006, 10:27 am
- Contact:
- RaiseMachine
- Posts: 1764
- Joined: December 6th, 2004, 6:05 pm
- Location: England
Both. Although I can't recall whether data already stored is affected...
"Doesn't the idea of making nature against the law seem to you a bit... unnatural ?" - Bill Hicks
"Money is the Schrodinger's Cat of economics." - Robert Anton Wilson
"It's not a bug, it's two features having a fight in the pub car-park." - Me
"Money is the Schrodinger's Cat of economics." - Robert Anton Wilson
"It's not a bug, it's two features having a fight in the pub car-park." - Me
- the-edmeister
- Posts: 32249
- Joined: February 25th, 2003, 12:51 am
- Location: Chicago, IL, USA
To remove existing Favicons from your bookmarks file:
1. Create a new Bookmark and save this code in the Location field in Properties.
2. Open your bookmarks.html file in the browser window - {Ctrl+O} or {File > Open File...}
3. Run the bookmarklet to strip the existing Favicons.
4. {Ctrl+S} or File > Save Page As... - to save the file
5. Replace the existing bookmarks.html file in your Profile folder with the newly saved one, sans Favicons.
Favicons can take up 85% of the total size of a typical bookmarks.html file! I have stripped the Favicons from a 2.5MB bookmarks.html file and ended up with a file of 464KB, a few times.
Ed
1. Create a new Bookmark and save this code in the Location field in Properties.
2. Open your bookmarks.html file in the browser window - {Ctrl+O} or {File > Open File...}
3. Run the bookmarklet to strip the existing Favicons.
4. {Ctrl+S} or File > Save Page As... - to save the file
5. Replace the existing bookmarks.html file in your Profile folder with the newly saved one, sans Favicons.
Code: Select all
javascript:(function(){ var ls=document.getElementsByTagName('*'); for (var i=0; i<ls.length; i++) {l=ls[i]; l.removeAttribute('id'); l.removeAttribute('last_charset'); l.removeAttribute('icon'); l.removeAttribute('last_modified'); l.removeAttribute('last_visit'); l.removeAttribute('add_date'); l.removeAttribute('personal_toolbar_folder');} alert('Cleanup Complete - Save as Web Page, Complete')})();
Favicons can take up 85% of the total size of a typical bookmarks.html file! I have stripped the Favicons from a 2.5MB bookmarks.html file and ended up with a file of 464KB, a few times.
Ed
A mind is a terrible thing to waste. Mine has wandered off and I'm out looking for it.
- richey
- Posts: 17
- Joined: December 27th, 2006, 10:27 am
- Contact:
Hi Ed and others,
thanks for the hint- meanwhile I've found the following: there are 4 settings to influence favicons -
// http://kb.mozillazine.org/Browser.chrome.site_icons ; overwrites all
user_pref("browser.chrome.site_icons",false);
// http://kb.mozillazine.org/Browser.chrome.favicons
user_pref("browser.chrome.favicons",false);
// http://kb.mozillazine.org/Browser.chrom ... s.max_size
user_pref("browser.chrome.image_icons.max_size",0);
// http://kb.mozillazine.org/Browser.chrom ... lbar_icons
user_pref("browser.chrome.load_toolbar_icons",0);
ALL of these settings have to be enabled or disabled to enable/disable the saving of the bloating favicons in the bookmarks file - but there is NO individual setting just influencing the bookmarks file. So, either you don't SEE any favicons at all or you SEE & SAVE them ... automatically, without any choice.
That's not good for portable / USB stick users!
Ed, I found an easier way: close FF, then open bookmarks.html with a good editor such as Wordpad , and replace all occurances of "ICON=" by some crap like "ICXON=". After the next reload, the bookmark file will be "cleaned". As always, backup the file first.
greetz, r
thanks for the hint- meanwhile I've found the following: there are 4 settings to influence favicons -
// http://kb.mozillazine.org/Browser.chrome.site_icons ; overwrites all
user_pref("browser.chrome.site_icons",false);
// http://kb.mozillazine.org/Browser.chrome.favicons
user_pref("browser.chrome.favicons",false);
// http://kb.mozillazine.org/Browser.chrom ... s.max_size
user_pref("browser.chrome.image_icons.max_size",0);
// http://kb.mozillazine.org/Browser.chrom ... lbar_icons
user_pref("browser.chrome.load_toolbar_icons",0);
ALL of these settings have to be enabled or disabled to enable/disable the saving of the bloating favicons in the bookmarks file - but there is NO individual setting just influencing the bookmarks file. So, either you don't SEE any favicons at all or you SEE & SAVE them ... automatically, without any choice.
That's not good for portable / USB stick users!
Ed, I found an easier way: close FF, then open bookmarks.html with a good editor such as Wordpad , and replace all occurances of "ICON=" by some crap like "ICXON=". After the next reload, the bookmark file will be "cleaned". As always, backup the file first.
greetz, r
- the-edmeister
- Posts: 32249
- Joined: February 25th, 2003, 12:51 am
- Location: Chicago, IL, USA
... replace all occurances of "ICON=" by some crap like "ICXON=". After the next reload, the bookmark file will be "cleaned".
Didn't know that would work, although it makes sense now that you mention it. Firefox seems to have the ability to 'heal' minor mistakes (that I have made) in the bookmarks.html file.
Ed
A mind is a terrible thing to waste. Mine has wandered off and I'm out looking for it.
- dickvl
- Posts: 54161
- Joined: July 18th, 2005, 3:25 am
The last pref in your post only works in Moz. Suite and SeaMonkey:
http://kb.mozillazine.org/Browser.chrom ... lbar_icons
* Mozilla Suite (all versions since 1.6 Alpha)
* Mozilla SeaMonkey (all versions)
So the other three are sufficient.
http://kb.mozillazine.org/Browser.chrom ... lbar_icons
* Mozilla Suite (all versions since 1.6 Alpha)
* Mozilla SeaMonkey (all versions)
So the other three are sufficient.
- dickvl
- Posts: 54161
- Joined: July 18th, 2005, 3:25 am
All the attributes mentioned in the JavaScript code should be removed.
With all attributes removed there shouldn't be a problem to compare files and import still works without those attributes.
If you want to keep some attributes then remove the corresponding l.removeAttribute('???') code.
With all attributes removed there shouldn't be a problem to compare files and import still works without those attributes.
If you want to keep some attributes then remove the corresponding l.removeAttribute('???') code.
Code: Select all
javascript:(function(){ var ls=document.getElementsByTagName('*'), lsl=ls.length; for (var i=0; i<lsl; i++) {l=ls[i]; l.removeAttribute('id'); l.removeAttribute('last_charset'); l.removeAttribute('icon'); l.removeAttribute('last_modified'); l.removeAttribute('last_visit'); l.removeAttribute('add_date'); l.removeAttribute('personal_toolbar_folder');} alert('Cleanup Complete - Save as Web Page, Complete')})();
- dickvl
- Posts: 54161
- Joined: July 18th, 2005, 3:25 am
You're welcome.
Sorry, I don't know about the & (maybe with a regular match / replace).
Do you want to remove that from the url or from other (all) attributes?
I don't know if it can cause problems, so why don't you lust leave those entities.
You can do that in a text editor (Find/Replace) if you want.
Sorry, I don't know about the & (maybe with a regular match / replace).
Do you want to remove that from the url or from other (all) attributes?
I don't know if it can cause problems, so why don't you lust leave those entities.
You can do that in a text editor (Find/Replace) if you want.