Glam Prestige Journal

Bright entertainment trends with youth appeal.

I need to set the home page of firefox upon user creation. I use the following method:

  1. Create a new firefox profile
  2. Find the path to the new firefox profile
  3. Add the line user_pref("browser.startup.homepage", "") to the user.js file in the new profile path.

This works every time except for the first. When opened for the first time, firefox opens the default homepage. If I then close and reopen the browser I see the homepage I set above.

How can I get this behaviour with the first time firefox opens?

2 Answers

On each start of Firefox the file user.js is read after the file prefs.js, and overrides corresponding settings in prefs.js. If you close and restart Firefox then the current settings are saved in prefs.js, so the lines in prefs.js and user.js will now be the same.

This might be the reason for your problem. To avoid it, perhaps the solution is to also modify prefs.js before the first Firefox call.

2

I found the way to achieve this was by adding the relevant code to the user.js file of the default profile, as opposed to creating a new profile, this was not required.

Mozilla documentation and even the comments in the prefs.js state that any changes to the file will be overwritten when firefox starts and to use the user.js file.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy