Showing posts with label firefox. Show all posts
Showing posts with label firefox. Show all posts

Wednesday, June 13, 2012

Disable New Tab Page in Firefox 13

Firefox 13 introduced something called "New Tab Page" which shows a history of 9 most visited pages in a tile interface, much like the way Google Chrome does. Actually it looks like the picture below:


But, there are two problems with it. First, if you don't want your browsing history to be shoulder-surfed (someone looking at your browser over your shoulder), this is not a good thing. Second, it actually makes the new tab open a slighter slower than before for which the reason must be obvious.

Anyway, since there's no point-and-click kind of configuration options anywhere in Firefox 13 to turn this feature off, we need to edit Firefox's hidden global configuration settings. This settings interface can be reached by typing "about:config" in the address bar and pressing enter. It will show you a plethora of Firefox's internal options. Most of these options are explained in "Mozilla Knowledge Base". In order to turn off the new tab page, the two relevant options are:
  1. browser.newtab.url
  2. browser.newtabpage.enabled
You can quickly locate these two by typing "newtab" in the search bar. As the name suggests, the first option is set to "about:newtab" as default which is the page that displays the 9 most visited page links in tiled interface. We can set it to "about:blank" to force disable the new tab page feature. The second option is better is setting it to "false" (by right clicking and selecting "Toggle" from the menu) will disable new tab. Next time we click the plus icon in the tab-bar or press Ctrl+T, Firefox will open new tab page without the tiled history links. Cheers!

Saturday, March 10, 2012

Recovering from repeated crash at Firefox (11 Beta 7) start-up

Quick Solution
 
Delete
  • session.js
  • sessionstore.bak
  • files inside sessions folder
from inside your Firefox profile directory. Follow this page to find out where you profile directory is located.

How I found what caused the crash
 
After quite few "unresponsive script" error inside Firebug 1.9.1 (mostly on LifeHacker.com and Boston.com) and repeatedly selecting "Stop Script" with no apparent benefit, I chose to kill Firefox from Windows Task Manager [1]. For those who don't know that it is - try pressing "CTRL+Shift+Esc" on your keyboard or just right-click on your task-bar and select "Start Task Manager". It looks like this:


I didn't realize the fun is just about to begin. To my surprise, upon the next restart Firefox started as usual and but quickly crashed. It kept happening much like flashing the Firefox's main window for a second or two and boom, it crashed! This behavior was already a good indication that it might be caused by a corrupted file, most probably a SQLite [2] database and this must have happened due to my killing Firefox forcefully using the Windows Task Manager. So, I started to digging around for a resolution.

First, I tried to start Firefox in "Safe Mode" with all add-ons disabled as suggested here [3] with "-safe-mode" flag. It didn't work! From my all previous experience, Firefox's safe-mode always seemed the best way to solve crash related problems, buggy extensions and add-ons. But, in this case it kept crashing even in safe-mode.

Then, I tried to open Firefox in "Private Browsing" mode with the "-private" flag. On Windows 7 (I guess on Vista too), this can be done with right-clicking the Firefox task-bar icon and selecting "Enter Private Browsing". Interestingly, Firefox was able to start in this so-called incognito mode! This was another strong hint that some files must be corrupted in my "Firefox Profile Folder" [4].

To try the theory, I closed all running instances of Firefox and I renamed Firefox's "profiles.ini" [5] to "profiles.ini.bak" to force Firefox into creating a fresh new profile. I started Firefox and it successfully created a new profile in my "%APPDATA%\Mozilla\Firefox" directory. The new profile directory was named "an9pz0cj.default".  By the way, if you are like me and you love your Firefox's plethora of customized settings and very longs list (77 in my case) of plugins only to profoundly avoid reinstalling them, don't forget to regularly backup your profile directory. My default previous profile directory was called "yn0z15ze.default" and I backed it up in a RAR archive.  After generating a fresh profile, which also generated a new profiles.ini, I copied all files (not folders, I decided to try them in the second iteration) from "an9pz0cj.default" and pasted them in "yn0z15ze.default". Windows 7's copy and paste is great. It kept showing me all the conflicts due to size, date-time of source and destination files. I kept the list of the files where the file-size was different. In my case, the list looked like the following:
  • cert8.db - SSL certificates are stored here.
  • chromeappsstore.sqlite -- HTML5 local data store.
  • content-perfs.sqlite -- Individual settings for pages.
  • permissions.sqlite -- Permission database for cookies, pop-up blocking, image loading and add-ons installation.
  • search.sqlite -- Information about search plugins
  • sessionstore.bak -- saved sessions.
  • sessionstore.js -- saved previous session
  • signons.sqlite -- Encrypted saved passwords
  • TestPilot.log --  Log file.
  • webappsstore.sqlite -- DOM local storage.
I Google'd up on the name of the files and got a rough idea of what they are meant for and how they are used inside Firefox. So, at this point I my preferred profile "yn0z15ze" is working but with some default files which means I must have lost some data, may be some customizations too as the list contains cert8.db, search.sqlite and signons.sqlite etc.

Now comes the final part - I have to test each of the files above one by one and figure out which one was causing the crash. As you may have gotten the idea already - I love my Firefox and my customizations. So, I wanted to make sure that I lose minimum amount of data due to the crash.

So, I renamed my previously moved "profiles.ini.bak" to "profiles.ini". By the way, profile.ini looks like below:
[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=1
Path=Profiles/an9pz0cj.default
Default=1
So, I could have just replaced "an9pz0cj" with "yn0z15ze" and saved profile.ini to achieve switching between profiles. Anyways, I did that anyhow and started copying files as shown on the bulletted list above from  "yn0z15ze" RAR archive to now running "yn0z15ze" with some fresh files of "an9pz0cj". I kept restarting Firefox each time to check if Firefox is crashing. After a few iterations of stopping Firefox, copying fresh files into "yn0z15ze" and restarting, I stopped at "sessionstore.js". I copied this file and Firefox crashed!

Wow, so now I know which file was causing my Firefox to crash! Also, now that I know this file only contains a list of my tabs which I was browsing before the very initial task-manager kill, I can safely disregard this file now ;). Phew, so the case is solved. If you happen to come across a situation like mine, try deleting the "session.js" and/or "sessionstore.bak" and/or files inside "sessions" folder. It's weird that even in Firefox's safe-mode the problem managed to persist. Time for a bug report I guess :). Hope you find it useful.

[1] http://en.wikipedia.org/wiki/Windows_Task_Manager
[2] http://en.wikipedia.org/wiki/Sqlite
[3] http://kb.mozillazine.org/Safe_Mode
[4] http://kb.mozillazine.org/Profile_folder_-_Firefox
[5] http://kb.mozillazine.org/Profiles.ini_file

Wednesday, August 24, 2011

Remove Firefox add-ons installed by 3rd Party Applications

The list of add-ons with pointers to the XPI code is here:

HKEY_CURRENT_USER\Software\Mozilla\Firefox\Extensions.

Just remove the unwanted entry from the list. Cheers :).

Tuesday, August 23, 2011

Multiple Java Console add-on in Firefox

I recently discovered more than one Java console add-on inside my add-ons manager in my Windows 7 machine. Since I only had only one version of JRE (Java Runtime Environment) updated to the latest version, this did not make sense. To make it more of an eye-sore, these add-ons did not have an associated "Remove" button in the add-on manager.

Some Google-ing revealed these are Java update left-overs. They do not have the "Remove" button because they are installed inside the %ProgramFiles(x86)%\Mozilla Firefox and not inside the %AppData%\Mozilla\Firefox profile directory.

In my installation, I had the following directories inside %ProgramFiles(x86)%\Mozilla Firefox\extensions directory:
  • {CAFEEFAC-0016-0000-0026-ABCDEFFEDCBA}
  • {CAFEEFAC-0016-0000-0023-ABCDEFFEDCBA}
  • {CAFEEFAC-0016-0000-0017-ABCDEFFEDCBA}
The blue numbers are indicative to the Java versions. To remove older left-overs, just keep the folder with associated with the latest Java version, which usually is the highest number in the list and delete the others.

Sunday, January 24, 2010

Java is not working in Windows Firefox ...

1. Reinstalling Java fixed it for me. You can download it from here:
http://www.java.com/en/download/
2. Some people also recommended deleting "NPOJI610.dll" from Firefox/Plugins directory.


Wednesday, July 23, 2008

Patch for "NoDelay" - GreaseMonkey script


The script can be downloaded from :: http://userscripts.org/scripts/show/6499

Changing the "Megashare" function with the following will make the script stop at the password prompt, if the file is protected by password. Otherwise it goes in an intfinite loop ...
function megashare(tld){
 if (tld!='com') return;
 try { unsafeWindow.c=0; } catch(e){};
  unsafeWindow.setTimeout(
   function() {
       try { 
    //var urlLink = getFirstXPathResult("//input[@name='auth_nm']");
    var urlLink = getFirstXPathResult("//*[contains(text(), 'Enter Password')]");
    if(!urlLink){
     findClick("//input[@value='Click Here to Download']"); 
    }

   } catch(e){}
   
   }, 1000);
 try { findClick("//input[@name='FreeDz']"); } catch(e){};
 try { findClick("//input[@name='yes']"); } catch(e){};
}

Change DNS cache timeout on FireFox


Type about:config in the address bar
Filter for DNS


  • network.dnsCacheEntries user set integer 512
  • network.dnsCacheExpiration user set integer 3600

The first entry shows the amount of addresses firefox will keep in cache and not try to resolve everytime.
The second entry is how long each entry will be cached for.

Happy Browsing !!


Friday, July 11, 2008

Duplicating tab on Firefox-3


press ctrl + drag-n-drop the tab on tab-bar ... kool, huh ?


Saturday, May 3, 2008

Sharp fonts in firefox [K/Ubuntu]


apt-get install msttcorefonts
Download this file :: http://www.sharpfonts.com/fontconfig.tbz
sudo tar xjvf /etc/fonts

restart firefox ... open www.google.com ... you'll see the difference for yourself ;)


My firefox fonts settings :

  • Default font :: Verdana :: Size=12
  • Font for :: Western
  • Proportional :: Serif :: Size = 12
  • Serif :: Verdana
  • Sans-Serif :: Verdana
  • Monospace :: Terminux :: Size = 12
  • Minimum Font Size :: 12

  • Allow pages to chose their own fonts
  • Default character encoding :: Western (windows-1252)