Firefox not remembering the last window size? This may fix it!

Martin Brinkmann
Apr 24, 2019
Firefox
|
28

Some months ago, I started to notice that the Firefox web browser was not remembering its window size when closed and reopened.

I usually run Firefox on one half of the screen on a 1920x1080 monitor on a Windows PC. Firefox would open and by doing so, change its window size so that a small gap was left at the bottom of the browser window and the Windows taskbar.

While it is easy enough to make the browser fit the space, e.g. by dragging its window to the left side of the monitor to have it expand automatically, it was something that left me puzzled.

It did not really bother me too much but when a user on Reddit pointed to a possible solution, I had to try it to see if the proposed solution would fix the issue on my end.

The user suggested that Firefox's fingerprinting protections had something to do with it. Firefox users can enable extra fingerprinting protection in the browser by changing a preference. Doing so blocks or mitigates certain fingerprinting techniques and data gathering methods.

One of the methods affects window dimensions; basically, what Firefox does is set windows to rounded dimensions automatically if the feature is enabled to mitigate fingerprinting techniques that read the window size.

firefox window dimensions fingerprinting

I decided to give it a try to see if fingerprinting protection was enabled in the browser, and if turning it off would resolve the screen size issue.

Here is what I did:

  1. Load about:config in the Firefox address bar.
  2. Confirm that you will be careful if the warning message is displayed.
  3. Search for privacy.resistFingerprinting. If the preference is set to True, the extra fingerprinting protection is enabled, if it is set to False, it is disabled.
  4. If True, set it to False and restart Firefox.

The preference was set to True on the system. I changed its status to False and restarted Firefox. Firefox did remember the correct window dimensions this time when I restarted it, and further tests showed that the browser remembered the window dimensions each time I started it.

So, if you run into that issue you may want to check the preference to see if it is responsible for that. It is up to you then to keep the protection enabled and live with the rounded window dimensions, or turn it off and have Firefox remember the right window dimensions each time.

Summary
Firefox not remembering the last window size? This may fix it!
Article Name
Firefox not remembering the last window size? This may fix it!
Description
Some months ago, I started to notice that the Firefox web browser was not remembering its window size when closed and reopened.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. Anonymous said on October 12, 2022 at 3:07 pm
    Reply

    This helped me out so much in 2022 lol Thank you.

    Couldn’t figure out why the browser never opened maximized.

  2. Justtosaythankyou said on July 5, 2022 at 1:34 pm
    Reply

    As of July 2022, this saved me. Got struck for weeks on the subject. Thank you.

  3. Miss the smooth ol' XP Days said on December 7, 2021 at 1:52 am
    Reply

    Wanted to add what worked for me for this same issue as it’s different from the original RFP true/false switch. Context:

    I had 2 annoyances returning to FF 94 on W10 – the crappy superlight pale grey browser color that makes multipl-tabs barely distinguishable from each other, and the very annoying failure to remember my window size (like others, I use the browser in alt-sizes when multi-tasking).

    The solution for the monochrome tab irritation was to turn off Proton in about:config “browser.proton.enabled” — it’s set to true, I reset to false. Still faint, horrible grey, but there is now some shadow around the tabs so I can see which is which.

    The bonus was that after doing it, my browser also now remembers the sizes I set! No idea what “Proton” is with regards to Firefox, but it obviously wrecks some basic usability and functionality for some of us :)

    To be clear, the “privacy.resistFingerprinting” remains set to “true” in my browser even after turning “Proton” off. And browser sizing memory is intact.

  4. John_3_16 said on September 13, 2021 at 1:47 pm
    Reply

    True to false did work for me. Aspire laptop running updated/current Win7 OS & FF 92.0.

    I have reacted to all updates 89.0 & higher by doing massive changes to counteract the fingertip sizing rampage that Mozilla is on. I like it the way I LIKE IT. My OS, screen & computer ARE NOT smart phone or touch screen dependent.

    My backup browser is Ungoogled Chrome. Use identical privacy settings & extensions for both. I now know the fingerprinting changes are forcing small window boots when FF is started. GOOD to know. Now changing back to true. Will learn to live with extra click each time I start FF to keep the privacy.

    Privacy & convenience are often at odds here. Will continue to hope Mozilla fixes both.

  5. 01101001b said on December 21, 2020 at 4:35 pm
    Reply

    Exactly my problem. The solution worked flawlessly! Thank you!

  6. Anonymous said on February 10, 2020 at 11:11 pm
    Reply

    Thank you, Deutschman.

  7. Luc said on April 26, 2019 at 12:18 pm
    Reply

    Just use Autosizer (SouthBay software).

  8. ULBoom said on April 26, 2019 at 4:01 am
    Reply

    Tried panopticlick with privacy.resistFingerprinting set to true and false and the true setting made the browser a bit more unique or identifiable. The big difference between true and false was shifts in entropy between display and canvas.
    But that’s just what EFF thinks.
    Either way, my IP is visible.

    What was interesting was I ran panopticlick in a version of chromium. Even though it has about 65% of the market, I was much more unique, I guess, because of the big limitations on what can be disabled in chromium/chrome.

    This is just one switch; as noted somewhere above, poor browsing habits, providing personal info, etc., can easily render moot attempts at hiding your browser.

    1. Pants said on April 26, 2019 at 8:26 am
      Reply

      my comment hasn’t shown yet, and I can’t edit the original. did a bit of a typo there in the first bullet point

      > so it’s representative of the “real world

      should be: so it’s NOT representative of the “real world”

    2. Pants said on April 26, 2019 at 8:23 am
      Reply

      I’ll try to keep this short. At the end of the day, due to the nature of sites like Panopticlick, AmIUnique etc, the results are tainted. The reasons for this are:

      – they interest and attract people who are interested in privacy (usually with tweaks and extensions etc), so it’s representative of the “real world”. For example FF’s RFP hash for a 10×10 white canvas is one in 6.73 browsers. That’s almost 15%. That’s over double Firefox’s entire worldwide stats on all platforms. That’s not to say that extensions don’t also use this, but most of them by default fake randomly, and extensions aren’t even used that much (what was that figure? half of FF users have less than 2 extensions or non at all?). This is probably the best example, as canvas produces probably the highest entropy – you’re basically always unique, so it’s the first thing EVERYONE tries to beat – cogito ergo sum: now the results are so far off real world, they actually disportionately poison the overall result.
      – results are tainted by repeat visits of said users, constantly trying to tweak their setups
      – the datasets are small: that’s not the sites’ fault (yes half a million is small)
      – the datasets can be outdated with old information, e.g user agents. Panopticlick only recently changed to a last 45 days (which is a good move), but this then plays into a smaller sampling (see previous point)
      – the tests are outdated or limited
      – some large scale real world tests in the last year confirm all of this
      – PS: That’s not to say they are useless, they are great for seeing what your browser returns.

      There’s a disconnect here from users understanding that while you might be in a pool of 1% of users (e.g say Tor Browser users), that the pool is massive. And what drives FP resistance is tightening up the bucket you are in – by enforcing the FP to be the same. Math is your friend. Lowering entropy (instead of raising it randomly, which just adds “information paradoxes” and breakage) is your friend. There is no point in hiding your browser (Firefox vs chrome), or OS (major platform) or UA as all they do is create more entropy (if trying to raise entropy randomly this is not an issue). And each spoof adds entropy in its own right, not just an overall “is this user using anti-FP’ing). Let’s say you spoof your OS and they can tell you’re not from the TCP/IP stack – that’s entropy. Lets say you spoof your browser from FF66 to FF60, that’s more entropy, and so on. It’s not more entropy when it’s enforced on a set of users. It is more entropy if you look at it worldwide.

      While I am not a statistician, the entropy here is almost a load of BS (because tainted data). While the percentages and entropy of each items do not change on repeated visits (I’m running an experiment myself where I’m testing twice every day for 45 days), that is my resolution is always 1 in 59 etc, my entropy has dropped from 16.5 (my starting point) to just under 15 (where I was considered strong protection) and I’m now under to 12.5. The number of browsers dropped from 1 in the lot, to 1 in under 5K. I suspect it would be hard to get under 12 for an entropy score. The thing here, is that the commonality of a FP is heavily weighing the overall entropy value (as it should), and that means tainted data will screw it.

      While some metrics carry an entropy of e.g 6.1 or 5.5, combined that does not mean they convey 11.6 bits of entropy – it would be more like. 6.5. In case you were wondering why individually they don’t really change, but the overall entropy does. However, the dataset does influence individual item entropy – take for example DNT. Almost no-one uses this in the real world, as it is opt-in. And yet the tests reveal it is approximately 50/50, and gives approximately equal weighting. There are three values: true, false, undefined. But lets just imagine this was binary: true/false. That’s 1 bit of entropy – if the split was 50/50. Like males/females in the world. Currently DNT on is 1 in 1.74 browsers with an entropy of .8 (out of a possible 1 if it were a binary result). In reality, DNT on would be lucky if it was 1% worldwide, and is nowhere near over 57% (1 in 1.74). While the max entropy individually would be 1bit (if truely binary), in reality, it would really help make you stand out (more than 0.8).

      Hope what I wrote makes sense. Anyway, sorry for the long post :) Sorry, not sorry :)

  9. cl said on April 25, 2019 at 5:45 pm
    Reply

    Thanks for info to Pants and 12bytes.org!

  10. VioletMoon said on April 25, 2019 at 5:06 pm
    Reply

    Interesting–after applying the recommendations listed on the Aris-t2/CustomCss site, the FF browser I was using on the main computer started opening non-maximized:

    https://github.com/Aris-t2/CustomCSSforFx

    On my laptop, I haven’t made the listed recommendations, and the browser opens fully maximized.

    There is a setting for Fingerprinting listed.

    Tor will also open non-maximized, and when one tries to maximize the window a popup provides a warning about doing so–it’s a privacy issue.

    If one uses the add-on Privacy Settings found in the FF repository, the same non-maximized window will start with the settings clicked to advanced or best settings for privacy.

    In theory, then, one of the settings in the Aris list or made by the Privacy add-on or used by Tor is the setting that makes FF open non-maximized. It’s not that FF is “forgetting” it’s last size; the setting is “forcing” the user to open a non-maximized browser.

  11. Richard Allen said on April 25, 2019 at 9:36 am
    Reply

    At the risk of receiving possibly well deserved ridicule, I don’t need no stinking RFP changing my browser window size. LoL

    I’m using a 24″ 1920×1200 display with my browser window size set to 1650×1096. My browser window is using ALL of the available height and leaving room on the left and right sides so I can access my shortcuts, folders and files on the desktop. Don’t really care about the width as much as I do that the browser is using all of the vertical space, which is why I gave up on RFP. I change the width every once in a while but I’m not going to spend time worrying about it.

    Anyway, I’m not using a VPN so isn’t my IP address an even bigger much more used fingerprint than my browser window size? :)

    1. Anonymous said on April 25, 2019 at 1:24 pm
      Reply

      It won’t matter much if only that computer with only that screen uses that IP. Some people don’t want to expose their specific viewing habits on each device. To me, allowing websites to know that I only do certain things when the window is on a specific monitor, in a specific size, at a specific location, is too much to disclose.

  12. LTL said on April 25, 2019 at 9:13 am
    Reply

    Isn’t the “FF not remembering last window size” a Windows 10 problem? I haven’t noticed it in Windows 7 or Mint, only in Windows 10.
    I think it has to do with Windows 10 wanting to determine what window size is ‘best’ for you in combination with the windows of other programs you are running.

  13. LTL said on April 25, 2019 at 9:12 am
    Reply

    Isn’t the “FF not remembering last window size” a Windows 10 problem? I haven’t noticed it in Windows 7, only in Windows 10.
    I think it has to do with Windows 10 wanting to determine what window size is ‘best’ for you in combination with the windows of other programs you are running.

  14. 12bytes.org said on April 25, 2019 at 5:18 am
    Reply

    disabling RFP is a mammothly BAD IDEA – there are other ways of dealing with this issue/Mozilla shortcoming other than throwing your privacy in the recycle bin…

    https://12bytes.org/articles/tech/firefox/firefox-tweaks-and-fixes-and-things#firefox_doesnt_remember_its_window_size_after_restarting

    1. Pants said on April 25, 2019 at 7:55 am
      Reply

      Well done grasshopper.. I mean young padawan :)

      1. 12bytes.org said on April 25, 2019 at 9:32 am
        Reply

        why do you always force me to look up stuff? “padawan” – nice – i’ll gladly be a subservient grasshopper :)

      2. Pants said on April 26, 2019 at 6:30 am
        Reply

        > why do you always force me to look up stuff?

        It’s an old jedi trick that masters use to help padawans

  15. S said on April 25, 2019 at 4:43 am
    Reply

    Shouldn’t changing 1 to 10 px in height and width avoid fingerprinting AND not make less of a NOTICEABLE issue to the user? Personally I never faced this issue though.

  16. Dave said on April 25, 2019 at 3:34 am
    Reply

    Like, is knowing the size of my browser window really of any concern?

    Me and billions other people use the same resolution so just run it fullscreen.

  17. Pants said on April 25, 2019 at 1:00 am
    Reply

    I’d just like to say that this is terrible advice. privacy.resistFingerprinting (RFP) protects against an awful lot of metrics that can be used in fingerprinting. It’s not perfect and still has a long way to go: e.g fonts and web audio FP’ing still isn’t covered: and that’s just items that simple common scripts like fpjs2 use. Lots more “other stuff” to come. But the point is, RFP is an all-in buy-in, so that way everyone has the same FP. So you don’t get to pick and choose which parts of it you want. And it covers LOTS of stuff, so disabling because of one thing isn’t a valid reason. It would be more productive and responsible to explain why this is necessary, the risks, and possible workarounds (of which there are several).

    That said, RFP doesn’t stop you resizing a window, it ONLY controls NEW windows (so it has issues when you change the chrome: manual resizing, going full screen, maximizing, toggle menubar, toolbar, sidebar, changing density, even changing themes (if they affect paddings and margins of some chrome elements). So RFP applies a sizing on NEW windows.

    Workarounds:

    a) Use the prefs to create a larger window on open
    /* 4502: set new window sizes to round to hundreds [FF55+] [SETUP-CHROME]
    * Width will round down to multiples of 200s and height to 100s, to fit your screen.
    * The override values are a starting point to round from if you want some control
    * [1] https://bugzilla.mozilla.org/1330882
    * [2] https://hardware.metrics.mozilla.com/ ***/
    // user_pref(“privacy.window.maxInnerWidth”, 1600); // [HIDDEN PREF]
    // user_pref(“privacy.window.maxInnerHeight”, 900); // [HIDDEN PREF]

    b) just maximize after starting, it’s one click
    c) something like what JC said

    d) FF67+ introduces a new pref
    /* 4504: enable RFP letterboxing [FF67+]
    * Dynamically resizes the inner window in 200w x100h steps by applying letterboxing, using dimensions
    * which waste the least content area, If you use the dimension pref, then it will only apply those
    * resolutions. The format is “width1xheight1, width2xheight2, …” (e.g. “800×600, 1000×1000, 1600×900”)
    * [NOTE] This does NOT require RFP (see 4501) **for now**
    * [WARNING] The dimension pref is only meant for testing, and we recommend you DO NOT USE it
    * [1] https://bugzilla.mozilla.org/1407366 ***/
    user_pref(“privacy.resistFingerprinting.letterboxing”, true); // [HIDDEN PREF]
    // user_pref(“privacy.resistFingerprinting.letterboxing.dimensions”, “”); // [HIDDEN PREF]

    Now, the new pref is a test pref, and is independent of RFP. Since RFP is meant to be an all-in buy-in, you can expect this pref to either be removed and the code tied to RFP, or the pref itself tied to RFP. But for now it is separate. It is not known if this will replace the browser/chrome sizing on new windows, or enhance it. And the stepping isn’t finalized either, it may even become a sliding scale of smaller steps at lower res to larger steps at higher res. Those decisions haven’t been made. But it does fix all the issues of chrome changes, manually resizing, maximizing, full-screen etc after a window has been created.

    Personally, I use the two prefs in a) above to help me utilize my desktop real-estate.

    tl;dr: If you want to increase privacy (in this case anti-fingerprinting), then you’re going to have to adapt a little. If a little thing such as window sizes upsets you, then you don’t have a chance. Friction is inevitable.

    1. thebrowser said on April 25, 2019 at 8:07 am
      Reply

      @Pants, Thank you so much for posting this, I’ve been wondering how to do just this for quite a while. I went with option a) since that gives me the flexibility to set a specific size on a per-profile basis.

  18. ULBoom said on April 25, 2019 at 12:12 am
    Reply

    I noticed the same thing a while back, I would get a centered window using about half the screen. Seems different devices give different window sizes and locations.

    Something else I discovered is if no images are displayed and this switch is set

    dom.IntersectionObserver.enabled false

    Change it to true.

    I learned after implementing a few of those config lists for privacy that many of the settings can make FF not work correctly. If any settings are cryptic or if the author warns about a particular setting, take note of what you changed and only change one or a few at a time if in doubt. Rebuilding FF after losing track of your mods is a pain.

  19. JC said on April 24, 2019 at 10:02 pm
    Reply

    I actually use an old utility, cmdow, to set several of my windows back to the positions and sizes I want. Two different batch files depending on if I am in the office with my dual monitors or floating around with my surface.

    1. Ray said on April 25, 2019 at 6:39 pm
      Reply

      I do something similar. Changing my window size is just a hotkey away for me!

  20. cl said on April 24, 2019 at 8:46 pm
    Reply

    On this system, 1440×900, it fills the left side of the screen only, regardless of last size before close. So I’ve been leaving resistfingerprinting off.
    Anyone know of some kluge to have most of the features without enabling completely? It would be nice to have it open maximised. It has been like this for some months now, I think.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.