Tuesday, December 16, 2008

Running multiple instances of Firefox

It is always useful to have several browser instances when developing and testing so that you can "impersonate" several different users at the same time.

IE does it for each different window; Firefox always shares the same instance even for different windows.

As per the title of this entry, you already know that Firefox allows you to do it but the "feature" is simply not available as a simple check box.

1. Start Firefox with the Profile Manager
If you installed Firefox in the default installation location, open a command prompt and run "C:\Program Files\Mozilla Firefox\firefox.exe" -no-remote -ProfileManager
2. Create a new profile
You can choose any name but I used "testprofile"
3. You are ready now to run a second instance of Firefox with the testprofile
Again, if you installed Firefox in the default installation location, open a prompt and run "C:\Program Files\Mozilla Firefox\firefox.exe" -no-remote -P testprofile
If you need to run the other instance on a regular basis, you will simply create a shortcut with the command line above.

Need to run more than 2 instances at a time? You will need to repeat the process above and create more test profiles.

For more command line arguments, check the Firefox KB.

2 comments:

nestorgallego said...

what about the cookies, does it use the same for each instance or are they independent?

if the answer is that they share the cookies, is there a way to run multiple instances with independent cookies?

thanks

Julien Jacobs said...

I have not tested it but I would assume that each instance has independent cookies.