How to prevent FireFox from storing Main Window size and location on close

As a two monitor user, i want Firefox to always open and maximized on the second monitor. The problem is that by default Fixfox saves the location, size and window mode to the Localstore.rdf file in the profile directory on each window close. And so if you need to move one window to the first monitor and close it there. Firefox now always opens new window on the first monitor.

Since i dont found any configuration option to do this, ive searched on the Firefox extensibility points and found a solution.

In Firefox all is html (not really, this is called XUL) also the main window. So if you go to chrome://browser/content/browser.xul, you can inspect the dom of the Firefox main window with Firebug as you can do it with any web page.

If you look at the root element you can see an persit attribute with the values ‘screenX screenY width height sizemode’. As this looks very promising,ive tryed to set this attribute to ” and this did it!

I am not an Firefox extension developer, but ive collected enouth informations to create an simple extension which simply sets the persit attribute to ” while the window load event. Ive called it “Dont Store Main-Window Size and Location” and you can download it below.

Download donststoremainwindowsizeandlocation@lanwin.de_1.0.0.xpi