Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Wannan tattunawa ta zama daɗaɗɗiya. Yi sabuwar tambaya idan ka na bukatar taimako.

Bookmarks Bar Fails to Load Bookmarks on First Run of Firefox

  • 3 amsoshi
  • 1 yana da wannan matsala
  • 10 views
  • Amsa ta ƙarshe daga cor-el

more options

We are using non-persistent desktops for a portion of our users and their primary web browser is Firefox, so I have attempted to customize their experience using the mozilla.cfg file which I have created. This mostly works however the very first time it opens the bookmarks I have added to the bookmarks bar fail to load. If they close firefox and re-open they come right up. Unfortunately every time they log into their virtual workstation they have top go through this process since the machine is non-persistent. The code I have used to add the bookmarks is as follows:

try {
var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
var uri = ios.newURI("https://localhost:61000", null, null);
var navBookmarksService = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Components.interfaces.nsINavBookmarksService);
if (!navBookmarksService.isBookmarked(uri)) {
navBookmarksService.insertBookmark(navBookmarksService.toolbarFolder, uri, navBookmarksService.DEFAULT_INDEX, "Add X");
}
} catch(e) {displayError("firefox.cfg", e);}

Like I said, it works, I just need it to work the first time, not the second.

Any ideas?

We are using non-persistent desktops for a portion of our users and their primary web browser is Firefox, so I have attempted to customize their experience using the mozilla.cfg file which I have created. This mostly works however the very first time it opens the bookmarks I have added to the bookmarks bar fail to load. If they close firefox and re-open they come right up. Unfortunately every time they log into their virtual workstation they have top go through this process since the machine is non-persistent. The code I have used to add the bookmarks is as follows: <pre><nowiki> try { var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); var uri = ios.newURI("https://localhost:61000", null, null); var navBookmarksService = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Components.interfaces.nsINavBookmarksService); if (!navBookmarksService.isBookmarked(uri)) { navBookmarksService.insertBookmark(navBookmarksService.toolbarFolder, uri, navBookmarksService.DEFAULT_INDEX, "Add X"); } } catch(e) {displayError("firefox.cfg", e);} </nowiki></pre> Like I said, it works, I just need it to work the first time, not the second. Any ideas?

An gyara daga cor-el

All Replies (3)

more options

russjohnson said

We are using non-persistent desktops for a portion of our users and their primary web browser is Firefox, so I have attempted to customize their experience using the mozilla.cfg file which I have created. This mostly works however the very first time it opens the bookmarks I have added to the bookmarks bar fail to load. If they close firefox and re-open they come right up. Unfortunately every time they log into their virtual workstation they have top go through this process since the machine is non-persistent. The code I have used to add the bookmarks is as follows:
try {
var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
var uri = ios.newURI("https://localhost:61000", null, null);
var navBookmarksService = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Components.interfaces.nsINavBookmarksService);
if (!navBookmarksService.isBookmarked(uri)) {
navBookmarksService.insertBookmark(navBookmarksService.toolbarFolder, uri, navBookmarksService.DEFAULT_INDEX, "Add X");
}
} catch(e) {displayError("firefox.cfg", e);}

Like I said, it works, I just need it to work the first time, not the second.

Any ideas?

If it works the second time it means, that this settings are apllied somwhere to application data/temp or something like that and it's loaded after this process. You must try to refresh/reget this data without restarting firefox.

more options

ESR mailing list or contact Mike

more options