Hacker News new | past | comments | ask | show | jobs | submit login
Tab Unloading in Firefox 93 (hacks.mozilla.org)
402 points by mthermidor on Oct 5, 2021 | hide | past | favorite | 275 comments



What I want implemented.. Chrome/Firefox whatever... is that instead of unloading and reloading when I go back to the tab I want it to export basically an HTML file and when I click back to that tab, I want it to reload the HTML file instead with some notification/marker that it is a "cached" version. There are times where I'll leave a tab in the background that I don't want refreshed but when it gets unloaded, poof, I lose the original data from that page.

I know about Chrome and its ability to prevent discards, but I want this to be the default or at least a toggle option. I don't mind the unloading of the tab, I just get annoyed when it reloads.


I was surprised recently to learn about the back/forward cache (bfcache) [1], a common browser optimization that sort of does what you're describing but stores a more complete snapshot of the page, including the JS heap. I'm not sure if it's used in this new FF feature (the article doesn't give details about the mechanism of unloading).

However the bfcache unsurprisingly causes edge cases in JS-heavy pages/SPAs, and a prevailing solution [2] is for the page to force a reload when it is restored from this cache rather than explicitly handling those edge cases, nullifying the optimization.

[1] https://web.dev/bfcache/

[2] https://stackoverflow.com/a/13123626/14665201


Only recently when I flew backwards through about 50 history steps (entirely different webpages) on my phone did I think more deeply about how impressive it was that it was so seamless.


Sadly lots of modern sites break it completely. I regularly have issues getting back to HN threads from websites, usually I end up at the HN home instead. Quite frustrating.


This should help, if it ever gets implemented: https://mozilla.crowdicity.com/post/728459


You can get this effect just by loading some document into the sidebar e.g. Show all bookmarks -> check Load this bookmark in the sidebar -> click that bookmark - I'm not sure how to do this easy in newer Firefox versions - with Browser Console maybe ?

If you want full Side by side browsing mode:

Some part of it is extremely easy - to display ALL tabs side by side:

  profile/chrome/userChrome.css :

  tabpanels {
    display: -moz-box !important;
  }

  tabpanels > notificationbox {
    -moz-box-flex: 1;
    border-width: 2px !important;
    border:solid #888;
  }
For the other part - to have only two panels, sibling is easy, otherwise you would need some JS to mark a tab as something like content-secondary and handle it (e.g. there was an extension last_selected_tab doing like this AFAIR) - as you have only:

  tabpanels > notificationbox > browser[type=content-primary]
(Just tested in Firefox 60.4.0.esr - newer versions may need some minor adjustements in CSS, toolkit.legacyUserProfileCustomizations.stylesheets preference set to true and probably some other fixes. In 2008 I had a Norton Commander 'clone' made in such incredibly simple way, ALL file and media formats preview (plugins), with a bit of custom code for nsIProtocolHandler, and nsIURIFixup fixes :) , kudos to archView extension by Pike/Solar Flare.)

R.I.P. Firefox.


I'm not convinced that you fully understood the point of this idea. The point is not just to just have any two web pages sitting next to each other (this is what your modifications do, right?), but more importantly the interaction between those pages.

I can already have two pages next to each other using Windows 10, by snapping two windows to the two sides of the screen. However, while that provides the correct visual shape, the user experience is completely different, as clicking a link in the left window will not open that page in the right window, replacing what's already there.


That's exactly how Load this bookmark in the sidebar works, you can have any document loaded into the sidebar, clicking any link on it will result in replacing document in the active tab (the only one visible).

https://mozilla.crowdicity.com/post/728459 says about Side by side browsing mode which I see as: with any two tabs, the content of the default active/content-primary tab will be replaced by link clicked on the other visible tab.


Nice idea.

Again something that used to work in Firefox.

FWIW: I use Tree Style Tabs (or Sideberry) to see why I arrived at a page. Not exactly the thing specified here but it works today.


> Again something that used to work in Firefox.

Yeeep, I used it for a while: https://archive.is/ovRDX (addon no longer exists, it broke with Firefox Quantum)


Yet another instance of SPAs pointlessly reinventing problems we solved decades ago.


Can you seriously not think of a single use case for SPAs?


There are a few. But they're good for a vastly smaller range of use cases than they're applied to.

You're writing Google Docs? Good for you, you can use an SPA. You're writing a social networking site? That should be a regular HTML page, with a sprinkling of JS. Blog? HTML page. Issue tracker? HTML page.

Every site I've used that's been plain HTML and CSS, with maybe minor supplements in Javascript, is much nicer to use than any SPA. People claim they load faster, but I've never experienced that in practice - a plain HTML page loads in milliseconds, but downloading a giant gzip of Javascript and waiting for it to make a zillion API calls takes seconds.

GMail's HTML-only interface fully loads and renders in ~630ms for me. The SPA version takes 11.69 seconds.

lite.cnn.com loads in 287ms. CNN.com takes 4.25 seconds.

thin.npr.org loads in 112ms. NPR.org takes 1.47 seconds.

Need I go on? Even for the lightest one, NPR, if you assume loading an article on the SPA version is instantaneous, you'd need to load 14 articles to make up for the slowness of the initial SPA load. The others are all much worse. And this is with an adblocker enabled - this will only get worse with one disabled.

Using SPAs when they aren't strictly necessary is a great way to shoot your site's performance, usability, and accessibility in the foot. You can fix the usability and accessibility problems, but you need to devote substantial engineering resources to doing so, and those are free if you just use the damn plain HTML.


To me a SPA is fine and usually preferable for anything I keep open for long periods of time. Sure, Gmail takes 10+ seconds to load. But I only load it once every few days at most because it stays open in my browser.


Cool. I don't feel like permanently dedicating a couple hundred megs of RAM to every site I need to use that decided to go chasing the latest counterproductive trend.


Single-page apps are forgivable for media oriented sites, so the video/music can keep playing as you navigate the site. in the past this was done with pop-up players and was generally messier, so I like SPAs for this.

Literally every other type of website on the planet should use traditional loading pages.


SPAs can easily handle routing via the history API, the problem is that companies haven’t migrated correctly.


It’s usually crappy though, like the URL and the history don’t accurate recreate the state of the app on refresh at all, or the history gets so clogged with every mutation of app state that the back button is effectively useless.


Twitter does it rather well, and that’s a site where it’s difficult and matters.


Again, that’s a development shortcoming, not a technical limitation. All of your concerns can show up in non-SPAs too.


Yes, I know in some theoretical scenario where the developers do everything exactly right none of these problems would exist. My argument is not that it's intrinsic to the technology, my argument is that my _experience_ is that the vast majority of (needless) SPAs are like this. Whether it's because frontend developers get all hot to re-implement standard browser features themself using redux, because the tooling is bad, or what, I can't tell you.


Aside from cost-savings for the business I can’t really think of one.


This is not an angle I’ve heard before - how does an SPA save money?


It’s cheaper to build single page apps using web developers than to build and maintain multiple platform-specific native apps.


Not everything needs to be a native application, nor should it be. The vast majority of SaaS and such apps are SPA/equivalent and would NOT benefit from being yet-another-installable app.

Could you provide examples (not exceptions) maybe to support your PoV?


> The vast majority of SaaS and such apps are SPA/equivalent and would NOT benefit from being yet-another-installable app.

Could you provide few examples of such apps that would not benefit from being native?


So the smaller-scale correlate would be that SPAs can make more sense for proof-of-concept or hobby-developed applications that need some cross-platform access.


Offload computations and rendering to the client


Which computations and what rendering? Very little money is saved from SSR vs CSR, rather the lower data transfer saves everyone money and time.


> Very little money is saved from SSR vs CSR

this seems counterintuitive.

SSR means most processing happens on big iron inside a dc, this has to be more efficient than each user buying a new machine every few years just to have that peak js-perf needed for the latest frameworks.


Opera (with the Presto engine) used to do this really well.


My number one annoyance (with Firefox and Auto-Discard extension) is when I open back my tab and get a redirection to some login page. Login, get sent to homepage. Back button sends me to login page. No way to get back to the actual tab I'd left there...

That tab is then lost forever, unless I can find it in the history from whenever I had opened the tab.


Two web apps I use every day at work have this behaviour when I look away and my session times out. Both of them break web expectations by having the same generic URL for every page. I leave half a dozen tabs open, come back later or the next day and if I'm not careful to login again in a new tab before I refresh them, they're lost. It's the kind of thing which makes me convinced the developers never use their own system, never sit with real users, and think a lot less of the vendor even though I have no power to influence the decision to renew them or not.


I think one problem of JavaScript routing is that it needs two groups of people to communicate for it to work: the ops people configuring nginx/CDN need to talk with the JavaScript devs making the SPA. Worse, if they get it wrong it will break in subtle ways (e.g. appear to work unless you reload of share a direct link).

A recipe for disaster.


That happens because someone use js to redirect and didn't use history.replace in the js redirection page to remove the redirection page from history. End up leaving the redirection page in the history. And cause the back button broken.


Long-click the back button to get a list of previous pages in the tab.


Right click for people with real mice


I have a real mouse. I didn't know that until yet!

The long click has still the advantage that you don't need to click more than once: You can just hold the button, mouse-over the wanted entry, and than release the button triggering navigation to the history entry currently under the cursor.


You can do the same thing with right click :)


It's not there. It's like the redirect replaces the history entry.


This! I feel like Back used to get instant results all the time, and now it's almost always a big delay, which is a huge pain -- plus, it loses your position on infiniscroll and other dark patterns.

Part of it is caused by site coding, but part of it is browsers treating "back" as some species of new page load/arrival/selection.

And I know it's possible to get us back to the old days! The functionality I want is almost exactly what I would (already) get if I just opened every link in a new tab and switched back instead of triggering the back button.

(Which, incidentally, is what many sites recommend doing now for that very reason -- at least reddit.)


Back basically works like it always did on static sites. Blame the fashion for single-page apps and endless scrolling for it being broken.


No. Blame browsers for not being user-agents any more. Browsers can cache websites, but only if websites tell them to do so. Users are never asked ( there is no setting ). And since websites usually don't want to be cached (for too long) browsers have to reload them ( which takes time ). Thats the reason Back-buttons are slow. Thats ( one of ) the reason(s) everybody has 100+ tabs open.

SPAs and infinite scroll are (maybe) bad, but not the cause of this problem.


Some infinite scroll-type pages consume ridiculous amounts of memory the further you scroll (and if the page disallows direct navigation to a point in history and you need to find something older that you didn't save a direct link for, you've got no choice but to scroll, and scroll, and scroll…), so limitless caching isn't quite the right answer, either…


AFAIK whether page will be restored or reloaded depends on its cache headers. I remember breaking back button in one of my projects, because users asked for it, as they expected fresh data for some reason. It was not SPA, just old server rendered website, so I disabled caching via response headers and it worked.


Hm I'm going to see if there's a setting to override a site's choice of that header.


I found no setting. Im using an addon "ModHeader" to set the response header (for all websites) "Expires" to a date far in the future. It worked in the past, but doesn't work at the moment. Have to debug it.


Wouldn't you need to modify Cache-Control?

>>If there is a Cache-Control header with the max-age or s-maxage directive in the response, the Expires header is ignored.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ex...

Edit: Also I'm not sure that is the relevant one? Reddit sets Cache-Control to "private, max-age=3600 [seconds]", but it definitely reloads the content if I back up in less than an hour.


Would love to know if this is practically possible. I use Auto tab discard [] to save memory, but I'd much prefer the ability to retrieve an html file than having to reload the page. A simple way to save that html file of current view when bookmarking a page would also be a useful addition in a similar vein.

[] https://addons.mozilla.org/en-GB/firefox/addon/auto-tab-disc...


Doesn't OS swap covers much of your need ?


Not when the need is to increase battery life (reduce cpu usage). Having a couple of youtube/reddit tabs open in the background can really impact battery life I've found.


This is my pet peeve. Most of the time I notice this when im interested in a reddit thread that's deleted and I lose the ability to review it.


This, plus any sort of live data (think stock market, tweet feed, etc.), plus any sort of form input (input fields should survive since like Firefox 3.5, but then people discovered you could also dynamically build forms with Javascript and the rest is history).


Chromium has "Paint Preview" (aka "Freeze-Dried Tabs") [0] which does something similar. Basically it consists of a capture (Skia Picture and links in a proto), compositing the capture into bitmap tiles, and then playback to play the page using the native UI.

I think it's only supported on Chrome for Android right now.

[0] https://chromium.googlesource.com/chromium/src/+/refs/heads/...


SingleFile [1] is supposed to be able to do that (more or less) by enabling these settings in the options page:

- User Interface > open saved page in a new tab

- User Interface > auto-close the tab after the page is saved

- Auto-save > auto-save on tab discard

Then you have to select in the context menu of the extension: Auto-save > Auto-save all tabs (or Auto-save unpinned tabs)

[1] https://github.com/gildas-lormeau/SingleFile


I think this gets to the root of why you're leaving a tab open. You might have non-persisted state in the page, hence you don't want to close it.


Non-persistent state in a page, or in the tab context itself --- how did I get here, what was I doing, what's the history for this particular session, what other tabs do I have open around this, etc.

None of the usual suspects generally suggested as alternatives to leaving tabs open really addresses any of this. For all the research into browsers and their use, the concept of user state and workflow is utterly ignored.


I can’t speak for Gecko or Blink/Chromium, but I don’t think this would be difficult to implement in a WebKit browser as long as some limits are involved.

Just save the tab’s contents in a webarchive file, then when restoring load that webarchive and inject some JavaScript that makes any kind of interaction aside from scrolling load the page’s live counterpart (with a confirmation prompt, perhaps).

This would also come with the advantage of the cached version showing up in browser history for “free”, so if you inadvertently go to the live page undoing it is as easy as hitting the back button, and if you decide you want to preserve the cached state indefinitely all the browser has to do is copy the webarchive file out of temporary storage to wherever the user indicates.


Can you contact me? Would like to explore implementing this idea in Orion with you.


Sounds like you want WebMemex, specifically the freeze-dry functionality: https://github.com/WebMemex


It'd have to be more than just the HTML, it'd need to be everything the page used. Basically, all the data you'd get by clicking the "download HAR" button in the DevTools Network panel. Including some special sauce on top to replay any XHRs (assuming you want to get to the last state by replaying... otherwise the JS page state would need to serialized some how)


Couldn't the browser just dump the current DOM and JS state onto a disk? Treat it like a computer hibernating.


Yeah it would be cool if it saved the state of the page until you manually refreshed it.


Unless I'm missing something, I want a "Save DOM as file"


I know this doesn't help with the cache part, but if you pin a tab, it used to prevent it from getting unloaded. Might help if a particular tab is important to you and they still honour that.


Firefox dont loses state or information when unloads a tab.


Of course it does. It tries saving the current scroll position and form data that might be present, and a few other bits of information, but for any even-just moderately complex JS-powered page this can easily break down unless the page in question has been properly coded to save and restore its state across a tab closing and re-opening (and a lot of pages haven't been properly coded in that regard).

Just try using any infinite scroll-type page – unless the pages saves the scroll position itself (to name one popular page, Instagram doesn't for example), all your scroll progress is lost once the tab is unloaded.


This is precisely what Edge does on Android, not sure if it's the same behaviour in Chrome on Android.


This is what I'm planning for my browser; the web engine will serialize a continuation of sorts that you can load into new instances and mutate in eg cli tools or another computer. Still chugging through basic features like js for now though.


One way to fix this is to buy more memory (if possible). Then your tabs will be much less likely to be unloaded.


1. Just. Fucking. Unload. The. Tab. Already. I keep tabs around for context and reference. Lots of them. [1]

2. Preserve. User. State. I don't want the page to reload. I want what had been there to be restored. Page position, content, any inputs or adjustments I'd made. Not updated data, but previous state.

3. Do. Not. Lose. My. Shit. I can accomplish this far better myself than you will ever have need to do.

4. Any tab last viewed > 10--15 minutes ago is all but certainly fair game. Just peel it off disk quickly when resumed, that's all I ask.

All that said, this is progress, thank you, I don't want to sound ungrateful.[2] But there is so much futher to go.

________________________________

Notes:

1. 1,530+ at last count. Don't judge me, unless you're a sphynx of black quartz, and then only my vow.

2. A bit late for that, I'm aware.


I'm being using Total Suspender. it's a complement that auto suspend unused tabs, using the tab discard API described on the article.

I don't loose anything. It preserves the state. The usage of ram it's fantastic. And I'm only have around 40 tabs open any time.

This new native auto unload, don't loses anything and preserves the state. it uses the same API!


I can never understand people that have more than 10 tabs open :P When I reach that number I start closing. Seems to me just a waste of space and the whole tab bar is useless and messy (yes, I know about tab extensions).

People should really get back to bookmarks, thats what they are for.

Besides my usual bookmark folders, I have folders to hold temporary bookmarks (ToRead, ResearchSupport, etc...). These I know I will delete after going through the content.

But I wonder if the whole bookmarking thing got frozen in time, and is not sufficient for most people. Perhaps new features are needed in order to become more useful again and replace the whole "keep-tabs-open" behavior


I'm constantly hovering around 100. If you're a developer this is very easy to achieve, as you quickly have to go down rabbit holes of documentation and exploration. Then you have tabs of your app itself, and potentially other things like Figma designs, JIRA ticket, etc.


1404 tabs open here.

Tab bar is indeed messy, I use Tree Style Tab in the side bar. And dozens of categorized windows, each with a name.

I don't need an alternative or better way. It works great and I hope this use case remains supported.


I'd be fascinated to hear how it works in practice to have that many tabs active? Are you able to digest them in any reasonable fashion or even find content later on when you need it?

I can't relate to that amount of tabs, but do have an upper limit of around 100 at which time I start actively trimming them down (either dismiss as having lost importance, digest or bookmark for later digestion).

My bookmarks steadily grow, but are categorized, tagged and labelled in such a way that I can easily find and digest certain types of urls later on when I feel ready for it. They do grow faster then I can consume them though.


I find it much easier to use than bookmarks. It's a great for research, when you have disparate bits of information spread out over dozens of sources. I close tabs as they become irrelevant. A window may have a lifetime of a few days to about a year. When I'm done I save its state using Tab Session Manager. By that time it's a 'best of' on that subject.

I also used 'New Tab Suspender' and 'Total Suspender' add-ons for a while in an attempt to reduce memory usage, but stopped due to Firefox crashes I assumed were caused by them.


You had me at "My bookmarks are ... tabbed".

Please tell me I'm missing something and that there's a way to do this in Chrome so I can access the tags on my phone????

I have about 30,000 unsorted bookmarks.

Yes.

Because I need tagging.


I'm not sure about Chrome, as I use Firefox.

Sadly Firefox does (for some peculiar reason) not give acceess to the tags on the mobile browser.

So I navigate by folder hiearchy on mobile; read > professional > development > android > db for instance.


Mobile Firefox (Fennec) doesn't support tags, but the text descriptions are searchable when entering URLs, so you can key off of those.

Effectively full-text-search tagging.


> Sadly Firefox does (for some peculiar reason) not give acceess to the tags on the mobile browser.

Oh. TIL. That's... a bit of an unexpected shortcoming I wasn't aware of. Hmm...

(My Chrome session is big enough that I don't quite have the RAM to play with Firefox, which I was coincidentally last playing with just as the WebExtensions update kicked in and broke my UI setup. Welp.)


same same for 20+years

i just don't have the time and energy to manage bookmarks it seems. web content also feels kinda temporary so i guess that is a good compromise.

sadly since quantum there is no more tabkit and the alternatives have a LOT less vertical density and the tabgroup-features are not on par.


While I can understand that point of view, Microsoft did studies and found that people learn static UI elements better than dynamic ones that shuffle around. How ironic then that they remade everything with dynamic ribbons, then re-remade everything with static ribbons, going back to their studies from the 90's. Sometimes you just have to change for the sake of change, I suppose...

I would use bookmarks extensively, but the UI elements to add, organize, and manage them have not kept up. We need something more akin to the Windows Explorer, to be honest - it's a great file manager that has stood the test of time since the 90's. Once I hit about 12000 bookmarks, I just stopped collecting more - it was taking way too long adding them with conventional UIs.

That's where tab usage comes in. Bear with me while I explain a use case, as this might take a few paragraphs... I'm also unsure how to word it in a way that avoids sounding arrogant. I'm in IT, but I handle support requests primarily from other IT people and businesses in my little corner of BC, Canada, and regularly handle a thousand or so support requests per week. (with no mistakes or missed details.) My colleagues have dubbed me a hyper-tasker due to the level of sustained speed and detail. But that'd be absolutely impossible without static UI elements. In this case features like tabs and Windows are basically UI elements for the tasks or data required.

I better get to elaborating...

Things that shuffle around slow people down, as now you need to search for the thing rather than go straight to it. Microsoft has published extensive good-UI-design whitepapers... and then proceeded to ignore their own research, a lot of the time. A good example is Alt+Tab - it rearranges previews based on what was last used, so if you have a few hundred things open, good luck ever finding what you want on the first attempt. I use 7 taskbar tweaker to fix that behaviour, plus taskbar behaviour. Alphabetical lists, thank you very much - with no previews. I decombine window stacks for that very reason.

Taskbars have tons of horizontal space - no need to jumble icons up and constantly rearrange them. I want the window for stock websites to be in one spot, the window for programming sites in another, the window for news sites in another spot, the window for /. in another, the window for printer remote servicing and on-site reset procedures in another, the window for videogame stuff in another, the window for looking up local business contact info in another, the window for web developer and Wordpress stuff in another, the window for electronic schematics for boat GPS systems in another, etc...

And when they get too many tabs, I just spill them over to another window, which goes beside the first. Since they are largely static, I can always find the right window for what I'm doing in under 200ms.

Then for tabs, I recognize the icons, and turned off all previews, then enabled keyboard shortcuts, so I can very quickly toggle between them. Again, each tab flip is under ~200ms (Depends on PC performance, but with Ryzen and 128GB, tab flips are always speedy), so I can do 5-10 tabs per second. Makes it quite quick locating what I want. Even if I mis-click and end up on tab 86 rather than tab 110 (out of 200 or whatever in the window), just hitting my keyboard shortcuts a few times gets me to the right spot. Since the tabs are basically a chronological history, I only need to remember roughly when I was working on something or looked up some information, and then I can go back in time or forward in time very quickly using the keyboard shortcuts. These tabs end up fully replacing the back/forwards feature built into the browser. Silly, right? Yet it works better.

Honestly, if someone asks me to flip to some task, it's usually about 3-4 seconds at most to get there, even with well in excess of a thousand open. When you're juggling a lot of tasks throughout the day for a multitude of clients and their clients, this shoots your productivity through the roof. 60-80 emails? 40 phonecalls? Oodles of tickets? No problem getting everything done. After all, all the tabs are up in front of you, waiting to go.

And if for some reason you brain-fart on where something is, now most web browsers have a tab search feature too. Takes a bit longer, but you can still get to the right tab in 10-15 seconds typically.

It's really work scenarios like this that drive this sort of need. When you're basically the helpdesk for multiple companies and other IT people and all their clients and their diverse tasks/requests. But I could see anyone that engages in heavy duty rabbit-hole research benefiting from similar UI use, perhaps with slightly less activity throughout the day, but still needing to keep tons of sites open and available until project completion. The difference there would be that they're working on a few larger projects, not dozens and dozens of smaller ones driven by clients.

I think most people that don't do this sort of hyper-tasking have no idea how proficient you can get at it. It's like those secretaries that pull off 200-300wpm on Dvorak or other keyboard layouts. Most of us are sitting in a more reasonable 30-60wpm range. Or those people that power-slide the lambo into a parking stall on a movie. It's way outside the realm of average use and skill, but you can't help but be impressed when you witness that proficiency.

Hyper-tasking is a skill that takes years to build up, as it requires mind, computer and software workspace to all be in sync with one another. But when you sit behind someone and watch them fielding requests and handling tasks that would normally take a team of 5 or 10 people, it's quite impressive.

Honestly, if I could have the perfect web browser for my use and my work, I'd happily pay $10/mo for it, forever - or at least until I retire. Why are pretty much all web browsers free, but don't cater to power user use cases like this? Hmm...

If you bothered to stick around until the end, I hope that explained one use case in a way that is understandable!


Ok, so you basically now have multiple windows to hold N tabs each. Now you need to manage windows AND tabs :D

We agree on the fact that bookmark management hasn't kept up with the times. I think bookmarks need to be re-invented for the modern era, no one uses them anymore.

But it also boils down to how you manage your own work. If I open a webpage, my workflow has only this options

- read it now

- bookmark for reference (long-term)

- send to pocket(read later - ereader usually)

- keep it open for a little while for reference (max 24hrs)

So I clean up the house quite regularly :)

Whenever I need to open something (like developer docs), i just Ctrl+L begin typing the title and autocomplete does the rest. Takes me a second and no clutter in my windows :)


You have 1,530 tabs open?!



Holy hell, I thought I was bad for hitting 200-300.

I didn't even know this was possible.


It's actually surprisingly stable and usable. Which may contribute to the problem ;-)

Tabs only load once directly viewed, so a session restore opens pretty quickly and doesn't actually use all that much memory. After a time, as more tabs are visited (and yes, I really do try to shut some down with time), the session eventually gets less usable, though that can take many days (I've not tracked this).

Moving and searching within the tabset itself is another part of the challenge, though at least Firefox will prompt if you're opening URL that's already open elsewhere. (Chrome ... fails at this.)

And yes, of course I'm using Tree-Style Tabs.


I found that Chrome destabilized and black-screened a lot when I had 1500+ tabs open, but Opera oddly enough did not. Opera seems to have slightly better memory management and background tab handling. (Puts them to sleep better.) That said, it does still take a very long time to reopen that many tabs. That's where stability comes in... you don't want to have to close and reopen your web browser throughout the day, if you can avoid it.

Opera does indeed have switch to tab, FYI - and open tab searching.


For Chrome, I think I usually manage to keep it under ~100 tabs, desktop.

Actually, far less than that as I've stopped using it entirely.


I've never had Firefox crash. I guess they are reaching for those edge cases on power users who keep a billion tabs open. Maybe I'm missing some sort of productivity hack that involves leaving 100+ tabs open.


I'm going to reply with a comment stolen from a different HN discussion:

The fact that people (myself included) have 100s of tabs open is a symptom of just how broken bookmarking is on the modern web. Bookmarks are a miserable way to create a placeholder for your thoughts. It's too static, must be maintained, and generally prone to link rot.

I'm a scientist. I open and read 10-20-100 links for a given topic depending on if I'm coding or if I'm writing my own papers. These pages are often very temporary for me, in the sense that maybe I'm browsing documentation and the exact place in the documentation that I'm visiting changes in time. Or maybe I initially believe a paper will be relevant to future work but I haven't read it and would like to get back to it in some time. I could spend the mental overhead of keeping an organized bookmark system that changes with these workflows day in and day out... or... I could just leave the tabs open. Guess which I choose? I have a laptop with 64Gb of ram for a reason. Although firefox is pretty fantastic these days in terms of resource usage.


Not going to expand on your point too much, but I've commented similarly in the past, and I heavily agree with you. There's so much room for innovation in browser UX, Bookmarks and tab archival never really evolved and it feels like we're just stuck in the past.

Part of the problem is that it's tricky for people to innovate on bookmarks in an accessible way, because I'm not going to do heavy browsing in a 3rd-party Chromium fork that doesn't have Firefox's privacy tools or support for Ublock Origin.

But more experimentation with bookmarking systems would be very welcome. In the meantime, here I sit with my 977 open tabs.


I respectfully disagree with both of you. A tab is a bookmark, the fact that tabs are allowed to run background processes and consume a crazy amount of system resources is the problem.

Why the hell is JavaScript allowed to run amok? I understand things like Spotify, but Facebook has no need to stream news feed updates if you aren’t even looking at the page. It really needs to be up to browsers to stop this behaviour because obviously JavaScript devs don’t self regulate.


I'm not sure I follow. Either that or I'm not sure you understand what I'm trying to say.

Turning off Javascript won't suddenly make 900+ tabs easy to manage. The UX isn't designed for that volume of separate pages, the tabs are cumbersome to navigate and still just don't really lend themselves well to large sessions that span multiple topics.

I'd believe the same thing even if Javascript had never been invented, tabs as they exist today aren't suitable for long-term content storage/references. Firefox doesn't even support tab grouping unless you set up another extension to try and hobble in tab tree support.


>Turning off Javascript won't suddenly make 900+ tabs easy to manage.

I'm fine with searching. I want to have searchable fulltext in those 900+ tabs.

Just for a back of the napkin calculation, I took the plain text from this comments page and saved it, and it came to 52kb.

My PC has 64Gb RAM. So even without any form of compression or indexing, I should be able to hold searchable fulltext of over a million tabs in RAM.

My PC also has Terabytes of slower storage.

Now please tell me, why should I ever have to close a tab?

Because Facebook needs continuous doomscrolling for its victims?

Well, that's a tradeoff that I wish wasn't forced on me, because I'd gladly force all those sites to be paginated if it was possible.


Again, I'm not sure what you're arguing about.

I just said "the UX here is due for a lot of innovation." And you replied "I want to have searchable fulltext in those 900+ tabs." Where is the conflict?

Yes, you could build a really interesting tab/bookmarking system in a browser that blurred the lines between tabs and bookmarks and archival. You could do really interesting things with browser history, you could do really interesting things with all of these features.

That is exactly what I just said, the area is ripe for innovation. Currently, you don't have full-text searchable tabs, the UX isn't optimized for your use case. Would be cool if you did though, that would be a feature that would be fun for browsers to play around with.


Just FYI, but Opera does search the full page contents of every tab when using the tab search located next to the minimize button. The browser seems to be one of the only ones innovating right now, at least for power users.

Edit: Now if only they'd fix their bookmark system!


Maybe I should check Opera out again, I used to use it back in the day and it had innovative features back then.

I forget what they called it but you could link one page to another, so I could have an index page open on one monitor and when you clicked on links in that, it would open those links in tabs in a window I had on another monitor.


I wouldn't say I was arguing, just ranting about my desires like most people here. And "again" implies that I've replied to you before, but that was my first reply to your comment. Perhaps you were confusing me with hsbauauvhabzb.

I even quoted the part of your comment that I was replying to.


I’m not sure if I’m missing something, but nvme drives are pretty rapidly approaching ram in terms of bandwidth, so it’s possibly sane to just offload tabs to ‘slow memory’ too.


I don't think you're missing anything. It's frustrating.


Tab management is a UX problem, same with grouping (I think there’s some plugins that manage tree views).

Tabs should be short lived bookmarks, long lived bookmarks could do with a UX update too.

I’m not saying I have all the answers, and we’re probably both half right. We’ve taken concepts which have been around since I can remember (IE5/6 days) and just run with them for 20 years without many substantial changes.


I use Total Suspender to shut down unused tabs and it works fairly well. Unfortunately, YouTube tabs take an overlong time to reload.


> Part of the problem is that it's tricky for people to innovate on bookmarks in an accessible way

Actually, I think it should be very simple. We already have Tree Style Tabs and it has Group-Tabs. Just mirror the Tab-Tree with a Bookmark-Tree, where Group-Tabs are folders, done. There is already a tab-tree-addon doing something similar (was it sideberry?), but it's still a bit fizzy and unstable and needs more polishing. I guess firefox itself needs more optimization in that area.

Similar could be done with Tab-Groups, when done good. There used to be a XUL-addon which added a tabbar for groups. Combined with tree style tabs on the side, this made a really awesome interface. I'm still sad that addons can't do this today anymore.


a tab, a bookmark, and a history entry

are you getting it?

a tab, a bookmark, and a history entry


Opera has a nice way to deal with this problem - contexts (similar to tabs groups in other browsers, but it completely removes unneeded stuff from tab bar) and recently they also introduced pinboards. I recently came back to Opera and I'm quite impressed of how this works https://www.youtube.com/watch?v=R2FbCCCmV9U

Oh, and "Flow" which is something like personal chat app, you can send links and notes and have access to them from Opera on mobile too. It's achievable in other ways obviously, but the workflow here is smoother, because it's built in and sharing link to website is done with one click.


Same issue. Except multiple short-term projects with hundreds of reference tabs, in multiple windows, ranging from groups that would classify as "mood boards" to research.

I settled for Workona when it launched about 2+ years ago after trying many extensions else like OneTab, SessionBuddy, Toby and so on.

I might start looking for something else again as Workona is getting a bit more, commercialized, but it's fine for now.


Bookmarking, history and unloaded tabs are three disjoint systems that all solve the same problem for me, each inadequate for different reasons. The solution to this mess is to unify the three.

Also two of these three, history and bookmarks, are presently bitrotting badly in firefox. Firefox's 'Library' window that shows History and Bookmarks in separate tabs is abysmally neglected.


I'd love to talk to you! I'm making a browser which already has automated ML tagging and full text search of content (should you enable it) so you don't really need bookmarks to do smart search and recall. We also have a really cool and well indexed snippet tool built in for pieces of information you want to keep and share. Id love to learn more about your use cases, if you're interested reach out to parham@synth.app :)


My use case may qualify; I have anywhere from 100 to 1,000+ open tabs across three different devices and four browser instances (three Firefoxes, one Chrome) at the peak. But judging from your website it looks like a full browser (presumably built out of Chromium) and not an extension that can be used in any browser, so, ugh.


Fair enough. The browser is built because we think browsers should do a lot more than just tabs and bookmarks, so it wasn't enough to just add an extension (we have many more features that we wanted a well integrated experience around).

With that said, there are very few limitations to the browser at this point and it will be eventually open source so feel free to reach out as well!


If you want to be innovative, have a look at the browser history function. There was zero progress, but I don't see a reason why the history should not allow me to browse all currently cached images.


That and the fact bookmark may ends up in a removed page, orphan link. Essentially people leave tabs open meant to keep a cache of it, maybe subconsciously. Bookmark doesn't do that.

I don't mind maintaining it, so sometimes I use getpocket for that purpose but getpocket is not organized and frankly is not made for this purpose.


> That and the fact bookmark may ends up in a removed page, orphan link.

Except in the immediate short-term, keeping a tab open doesn't really fully help in that regard, though – even if the browser doesn't autonomously unloads tabs, sooner or later most people will eventually need to restart the browser and/or computer for updates, old pages are eventually evicted from the browser cache, and so tabs suffer from link rot just the same as bookmarks do.


For me the benefit of using tabs over bookmarks is that from the order of the tabs you can figure out what you were doing at the time. With tabs it's also quicker to go back later and close what you no longer need.


Bookmarking systems are completely outdated, but I'm not sure what they should be replaced with. What would help you in this case so you didn't have to worry about losing the tabs if you closed them?


Maybe a sufficiently good implementation of history search could replace the need for bookmarks entirely. Instead of just matching on page titles, match on content as well. Rank results according to relevance and time spent on the page.

Or alternately, maybe bookmarks could become an extension of existing tab management features. Something like Chrome's tab groups or the Tree Style Tabs[1] extension for Firefox, but with the ability to "archive" tabs or groups of tabs into a searchable repository for later reference.

Just some ideas...

[1]: https://addons.mozilla.org/en-US/firefox/addon/tree-style-ta...


History should do an automatic Save As, Complete for every page. History search should do a full-text search. Viewing a page from history should open the saved version, with reload or a button to load the original URL.

These are all obvious ideas for computers with lots of memory and disk space, but browsers are one-size fits all designed for 4 GiB laptops and old phones.


These are actually really good ideas, I had never thought of it like this but I like it. History is really all you need in the end. Bookmarks are just a starred version of history, which could easily be included in the matching algorithm you're talking about.


Safari's history search has been able to search content for a probably decade now.


How can they be outdated? I have a bookmark folder at work related to some internal systems that I need to access to do a specific job. Being able to open a bunch of specific URLs at once and then have access to what I need right away is really, really nice and I haven't found any other way to get close.

The same with youtube videos (I like to run hour long videos that create a soundscapes in the background), it is super easy to create a collection that you can open with just a few clicks.

This doesn't mean bookmarks are a substitute for lots of tabs, but I still think bookmarks have a place.


I'm not saying it would be better, but you could shell script your platform's equivalent of:

    start firefox http://example.com
    start firefox http://example.org
    start firefox http://example.net
and that would "open a bunch of specific URLs at once" with a single invocation. Or make a filesystem folder with URL links in it and select many of them and open all at once. Or make a HTML page with some javascript which 'clicks' multiple links at once.

The only thing that does not do is appear in the browser UI itself, and browsers go a long way to try and make sure bookmarks don't either :|


Bookmarks work, but I find them cumbersome. The outdated part for me is having to put them into folders manually, which doesn't have the best interfaces for this. I think that's why so many people load so many tabs at once, if you close the window getting them back is difficult unless you want to hand-sort hundreds of tabs in some cases.

I'd like to see them stored in a database where you can get the data out by running filters. Those filters should be able to search meta data about currently opened tabs, browser history, saved tabs or sets of tabs, and some data from the web pages themselves. It should be simple to search all my currently opened tabs for a list of terms (like sql, select, from, where, etc) and have them be moved from my current window to a new window. I should be able to save these as a set of tabs labeled "sql". If that set already exists, it should combine them, throwing out duplicates. Ideally, web browsers should have the ability to save keywords from pages you have visited in your own little web data store. If I ran across a reference to a particular subject in the past few days, I should be able to search my history and my store of keywords for pages that mention that subject, and load them all into a new window that can be saved as a set of tabs. I should be able to search for web pages in a set of sets of tabs that have been modified in the last hour. Or open all images I've seen on webpages in the last couple of days or that have a keyword in the image name.

Manually sorting bookmarks does work, but I'd like to see something a lot more robust. I can, for example, bring up the history sidebar and see if I can figure out which site I was on that mentioned a particular game or physics term or whatever, but it should be a lot easier to do these things. In Firefox I can search page titles for a specific page, but it won't search through the page contents.

On a related note, it seems to me that all browsers should be able to act as web spiders so that every page you come across through daily operation goes into your own search terms database and that searches should start there before going to one of the search providers. Maybe have them spider links on each page a level or two down so you can find related items easier even if you didn't actually go to the page in question. You would also be able to search the parts of walled gardens you've visited lately, which normal web search won't see.

Anyway, I'm just spit-balling here, but it seems like there is a lot of room for innovation in how we select, save, group, and access web pages.


> I'm not sure what they should be replaced with

Try Edge, the collection feature is a game changer.


I hear your qualms about bookmarks but to me having 100 open tabs does not save you from any of those issues at all, it just exposes you to things you never would have encountered otherwise. Macbooks I've owned randomly crash, always has always will. If I had 100s of tabs that would certainly be annoying to deal with opening that session again and watching my computer achieve liftoff with the fans when those 100 tabs open at once again.

Personally as a scientist I'm aghast you operate this way. If you were my student I would change everything about this system of yours. My word. Use folders for your bookmarks to keep things organized. Save important documentation as local pdfs so you can refer to it when you need to keep working and the site is down and you can't click to new pages (happened to me before). Use zotero for gods sakes to organize your literature. Just do it, promise me you will. You've given me a headache just imagining your workflow :)


People have different work flows and that's ok. No need to be so controlling...


Problem with that is that now I spend my whole life figuring out how to save stuff as an offline pdf or whatever, and the pages always break in some way when you try to save them.

Often when given the option either mucking around with that or just leaving the tab in the background, I end up choosing the latter.

Our tools should be better.

Why can't it be one click to save the whole page? At least the url/text/images... I have terabytes of storage but no easy way to save a webpage.


zotero can save a webpage snapshot in one click. other browser extensions too. bookmarking practically speaking is no different than having a pile of tabs open, you just aren't consuming as much of your system memory.


It sounds like you could just close these tabs once you switch to another one, or maybe have a timer on them so that they auto-close after N hours. There are probably extensions for that.

I use very few bookmarks now, the ones I have are just for websites that may be hard to find, or simply the ones that I visit enough to want a quick suggestion when I start typing the URL.

I almost never regret closing a tab, if I need it I can find it again. If not, it means it was not that relevant, and I might just as well start a new search from scratch to possibly find a better link instead.


> I use very few bookmarks now [...] if I need it I can find it again.

I have thousands of Org files that include hundreds of thousands of references to sources of information, and I'm confused by your workflow. How do you quickly relocate sources of the highest quality information that aren't among the top search results for relevant queries (which is the result of search engine rankings mostly being popularity contests whose participants are dummies)?

For example, I recently bought a new toilet after reading in-depth discussions about toilets at a small web forum for plumbers who were far more knowledgeable than people at related subreddits, etc. I don't remember the name of that forum, but it's in my toilets.org file, along with 452 other toilet-related links. Why would I want to relocate that web forum and the other 452 sources of information in toilets.org the next time I buy a toilet?


Maybe I should have written "web browser bookmarks"? I do use web links and put them in various places, just not in the browser where they lack context.

But still, maybe you end up with this unique link once in a while, and if it's that obscure, I find it worth exporting the page as pdf / html. My point is that in most cases, saving them (as bookmarks) is counter-productive.

> Why would I want to relocate that web forum and the other 452 sources of information in toilets.org the next time I buy a toilet?

Because they'll be outdated by then and you'll end up having to search again. If they're still relevant they'll resurface anyway. I find it hard to believe that your 452 sources all are and will remain better than the top 10 results of your search engine.


Auto discard + tree style tabs = no reason to actually close tabs.


The best solution I've got right now relies on these FF extensions:

Window Titler to have a topic name for each window

Multi-Account Containers to have an account for each window

Temporary Containers when I don't want to use a specific account for a tab

Total Suspender for shutting down all the obnoxious JS that runs in background tabs

In addition, I pin a large # of base sites.

This is all working fairly well, but would be much improved if FF had a Move Tab option that lets me select a specific existing window. DUH - such an obviously useful feature!


> This is all working fairly well, but would be much improved if FF had a Move Tab option that lets me select a specific existing window.

'Other Window'. Can't live without it.


have a look at sideberry


Thanks! That does look like a good solution for moving a tab to a specific window. Serious bummer that it Sidebery doesn't include a Window selector. It appears to want to use panels, but panels can't be named. Turning off the horizontal tab bar in FF is also a hack rather than a simple setting.

(edit) UG. The only way to create a new tab with Sidebery is to use a keyboard shortcut - this makes using Multi Account Containers a serious PITA as you can't just open a tab directly into a container. so frustrating!


The tabs are the bookmarks, we just need better management of tab contents (ephemeral, short term persist, long term persist, etc).


Bookmarks have limitations but I really think the issues most people have are not forming good habits.


It's more of a symptom, how bloated the modern web is.

5+ browser windows on 32mb of ram was never an issue back in the win95 time (so, whole os + browser and 5 pages). Now, we've got 8 gb of ram as pretty much minimum on mid range laptops, soon even on phones (flagships have it now), and browsers have become a biggest memory user (outside of newish games) on an average pc.


In 1995 there was no tabbing (I think?). I have 5+ browser windows with 100+ tabs open, so more like 500 browser windows, not 5.


A reference manager like zotero would help. You can add non-paper references easily also.


...or you could simply download what's necessary/interesting and ensure that you've got the data as it was. Because people seem to think that everything needs to be an app, having something open in a tab is no guarantee that it'll be there when you revisit the tab.


I can't speak for the person you're replying too, but I have somewhat similar use cases sometimes, and what you propose isn't really a fix. For instance, when programming, the documentation could be spread out amongst many webpages (like each chapter or each section in a chapter is a separate page). And that might not be the only reference I'm using. And then add in separate pages for examples, too. It's not always possible to anticipate all your reference/example needs at the beginning of the project, so downloading everything doesn't always work.


If the documentation site is worth its salt it will allow you to download a local html copy or even pdf. I personally haven't seen a documentation site that doesn't let you do this, since its important to store your documentation locally in the event the website goes down (happened to me so its not out of the question).


Oh, no doubt that (or just a single webpage view of all the documentation) _should_ be something that all documentation should provide, but I don't think it's any surprise that not everything has good/ideal documentation.


Often your browser can do this. It's especially easy if you can view the documentation on a single page. Pagination on mostly-text sites is a bizarre habit that's about as necessary as a screensaver.


It's especially baffling with the pagination when the source document the website is generated from is a single markdown document on github most of the time. Just give me that. It's a computer, I don't have to thumb through pages like a bound book, i can ctrl f for my topics.


The problem is it's not simple.


Checkout toby extension, unfortunately only for chrome.


Right-click on a tab.

Select all tabs.

Bookmark tabs...


There's a handful of horrible websites that use enormous amounts of CPU and memory. You don't need too many of those to drag a browser down. I am a thousands-of-tabs user (and yes it's an awesome productivity hack for a number of my workflows, but never mind that) and I don't normally have any problems. Unless I make the mistake of opening some trash website (Slack used to be like that, I've not used Slack in years so I don't know if it still is) and then it bogs down everything.


Slack is still trash.

I segregate browsers by using different Linux users for different tasks (slack, Facebook, general, etc) which works well with my similarly bespoke workflow. The problem with this arrangement is that When Firefox has pending system upgrades it requires all browsers be closed and reopened.

I’m curious about your productivity hack though, I use a grid keyboard layout with ~20 workspaces grouped to four windows for each task/project and one set to emails/fb/slack


I do electronics. I keep my BOM entries as tabs, with a tab for each major component, its distributor page, and often its manufacturer page where the documentation lives. Different projects have their parts chunked together as bunches of tabs, so I can search my tabs for a part number and get that and everything else in the same project is nearby in the tab list. I currently have >3000 tabs open.


Interesting, in your use case, would having like ‘multi page bookmarks’ work?

How many vendors are there? If there’s a small pool maybe scraping their datasets would work well also


Possibly, but bookmarks are trash UX and I hate managing them.

There are few vendors but they have millions of pages and the relevant data changes daily.


Firefox runs on systems with 512MB RAM. [1] Can you imagine keeping a Slack tab open on a system like that? Never mind 100 tabs.

[1] https://www.mozilla.org/en-US/firefox/93.0/system-requiremen...


To be fair, I tried running it recently on a machine that I had artificially limited to one core and 512MB RAM; it was not actually usable, even for static pages. WebKit browsers didn't really do any better, though, which surprised me.


You can’t even boot the Ubuntu cli installer.


As someone who regularly has >300 tabs I can promise you that it is not because of any productivity gains (if anything the opposite lol)


How is that possible, I get FF crashes literally every time I load a moderately intensive website (eg. Google Keep). I still use FF because I can't abide Chrome. My PC is admittedly a bit older (only 6 gigs RAM) but still.


I routinely have hundreds of tabs open in Firefox at any given time without crashes on macOS and Linux. The tabs include everything from documentation, Jupyter notebooks, papers, Jira, Reddit, HN, Github, Gitlab, GMail, Google Keep, Todoist, etc. I can't even recall the last time Firefox crashed for me.


Many hundreds of tabs here in FF on Windows and pretty rock solid.


Agreed.

I've got 99 problems with Firefox, but a crash ain't one.


6GB is ample memory if you're not loading tons of tabs. I run Firefox on Raspberry Pi model 1s and while you have to limit yourself to a tab or two and have plenty of patience it does still work.

What doesn't work is trying to compile the browser on the Pi. The build process has some really gigantic source files that cause the compiler to choke.


Just throwing it out there - most software and OS's adapt to fit hardware constraints. I was running 32GB of RAM, and regularly hit 20-24GB of use in my web browser. When I switched to 128GB of RAM and reloaded my session, my web browser expanded its use to 40-44GB and performed a lot better. While Firefox may be working with 6GB, it may work a lot better with 16GB, for example.

The crashes could be some addon or other profile feature interfering with Firefox's stability. I had a profile that I migrated from FF 1.x, and I finally had to put that one to rest...


I don't know if I've experienced a crash in Firefox in years. I would really suggest taking a look at the crash logs and maybe do a checkup on your machine's health.


You should really check if you have bad memory. I've found firefox to be very sensitive to such an issue


Paste a few links from about:crashes here. If you click on them, you might find the associated bug (if it exists).

Firefox should literally never crash. If it does, that's a serious bug (but especially on Windows, not necessarily in Firefox itself).


Fwiw i left Keep a few years ago because they totally fucked the web client. Wouldn’t work for me on either ff or chrome. Had a few thousand notes. Not sure if it’s any better now but that may be a Keep specific thing


I've only got 4 gigs of RAM, and don't think I've seen Firefox crash in years. And I run Jupyter notebooks, browser games, image processing, all sorts of intensive things on it.


Hum... Firefox breaking on some Google site is surprising, but not extremely so.


Maybe corrupted firefox profile? Try running it with a new empty one.


It's the same productivity hack as the piles of stuff around my house I'm never going to use.


I'm using a screen reader and FF regularly crashes due to some broken memory management in the accessibility service. If this unloading cleans the memory before it gets critical, I'm all for it.


Do you have any crash report IDs in your Firefox's about:crashes page? I can check whether a Bugzilla bug report has already been filed for those crashes.


I think that the issue is known, but hard to track. It shows with NVDA and heavy web apps like Twitter and Messenger if they are running for some time. I'm posting here some of the crash ids, but it is likely that they are not representative. When the browser starts to clock up, it locks the screen reader as well and I'm not waiting for the crash, but kill the process with extreme prejudice. I'd be glad to help in any other way.

bp-cb27fd07-ad27-49bf-b6c2-9dbbb0211005

bp-96eef135-da51-45a8-a792-d28810211005

bp-184a8916-227c-42c4-8308-6e3c00211005

bp-ba6748d3-2d93-4d84-992e-8cf960211005

bp-8bdfb00f-0e30-4cd3-826c-efb910211005

Here is the Bugzilla ticket: https://bugzilla.mozilla.org/show_bug.cgi?id=1572915


Unfortunately those crashes do not appear to be related to low memory scenarios. They seem to be genuine bugs in the screen reader. I think the right bug tracking them is this one: https://bugzilla.mozilla.org/show_bug.cgi?id=1691928


As I said, usually I don't wait for a full crash so there is a survival bias in those ids.


The original ticket seems to indicate this is a leak in a Windows accessibility service and so far there was no luck in finding a way to avoid it. That sucks.


Well, if I'd like to have something rewritten in rust, this would be my first choice. :)


Firefox crashes completely at least once a week for me, and tabs crash at least once a day. I had a brand new tab crash the other day, just seconds after I had opened it and visited a text-only site (no JS, no images). I'm running Firefox 92 on up to date Debian on a machine with 64GB of memory; it's not running out of RAM.

I still use it because it's better than Chrome, and I wouldn't touch Brave with a 10 foot pole.


What add-ons do you have installed? I've never had a problem like this in Firefox, in the 10+ years it has been my primary browser (on Windows though). Have you done a memory test too? Something definitely sounds broken here.


I've ran into weird issues like that before. After so many updates, I'm guessing something gets broken somewhere, somehow.

Back up your extension settings and bookmarks, and do a fresh install of it. Bit of a nuisance but usually fixes any weird behaviour in my experience.


Paste a few links from about:crashes here. If you click on them, you might find the associated bug (if it exists).

Firefox should literally never crash. If it does, that's a serious bug (but especially on Windows, not necessarily in Firefox itself).


That doesn’t sound normal. Perhaps your profile is in some sort of inconsistent state after years of usage? Maybe give it a try with a new empty profile as well.


Recently switched to chrome as a many tab used, it’s less stable than Firefox for me.


You may want to try Opera. I found it more stable than Chrome, at least after spending an hour in the Settings and about:flags disabling all the extra features that I didn't need.


My peak is in the high 300s of tabs. It works fine, though I imagine if they were 300 instances of youtube or some webgl game or video calls there might have been more issue.


People on low memory machines, or people on big boxes that read some article about how swap makes your SSD die and tried to disable Windows swapping (or downloaded some "optimization" tool that does that). The last is explicitly hinted in the article. There's a surprising amount of people in that situation.


I've seen this on my 4GB RAM netbook. This is basically what Chromebooks do when you've got too many tabs open, and it's much better than the system trying to thrash itself to death, which is what it does now.


I can't reply to the dead comment here, but if you're looking for a tunable version of this functionality try https://addons.mozilla.org/en-US/firefox/addon/auto-tab-disc...


Thanks.


Something surprising I learned recently is that this is an anti-pattern when building an iOS app. iOS has a memory compressor, so if you try to purge resources in a low-memory situation, it can cause memory use to spike as the things you're trying to free get decompressed.

The SDK provides a notification when memory pressure is high, so people try to get aggressive and purge their caches and unused assets when that notification arrives, but that only makes the problem worse.


Linux and Android have that too. Called Zram. When using zstd a compression factor of 3.5 on swap memory is common.


Apple accelerates this compression in hardware, given that it's on an extremely hot path–especially when the system is under memory pressure.


Plus, the code to handle that is likely little-used and may have been dumped. Just being able to run the handler that does low-memory handling may pull in things and increase pressure.


Sounds like they need a "free without uncompressing" feature.


I think the issue would be that the compressor works on whole memory pages (I assume), so you'd need to know that the whole page could be freed. There might be kernel VM functions to handle that functionality manually, like if you were building a zone allocator or something?


I think it’s kind of related to how the oomkiller really needs to be integrated with the applications - the application needs to be able to identify memory as “critical, nice to have, ehhhhh, and cache” and then let the kernel throw them away as necessary. Once you start having to throw away critical pages you oomkill the process.


Doesn't good old uncompressed swap partition also have the same problem? Page is swapped out but it has to be paged in before the process owning it can evaluate what's where and release the junk?


> Firefox will respond by unloading memory-heavy but not actively used tabs.

A dropped tab cannot always be reloaded to the same content. No thanks, I'd rather get more RAM or swap space for paging.

The tabbing feature of "close all pages to the right of this one" is almost good enough for me.

What I would like is some UI where all the tabs are compactly shown as rows in a table. Here, you could select tabs and move them up or down, delete them, or farm them off to their own window.


The Tree Style Tab add-on might be relevant to your interests? It's a little flaky since the switch to new style extensions, but still better than any other option I've seen:

https://addons.mozilla.org/en-US/firefox/addon/tree-style-ta...


Seconded. I can't make heads or tails of other people's tabs but mine are in this neat list. Must say I don't use the tree feature at all and I disabled any kind of collapsing behavior, it's just vertical tabs (that Mozilla supported with an extension of their own! For all of two versions...) that help me with working on (looking at) various things in parallel across weeks.


I’ve recently replaced it with Sideberry which seems to be more performant.


>No thanks, I'd rather get more RAM or swap space for paging.

As the article explains, if you have enough swap you'll never trigger this. It activates right before you'd have crashed otherwise.


Yeah, what I really want CRIU but for tabs.


I've been experimenting and exploring a few ways to implement this for my own browser [1].

The options seem to be:

- Great Suspender style suspension [2] - swap page with a simple low memory placeholder and reload back (detecting interactions)

- Chrome/FF style tab discarding (only happens with memory pressure) [this post and 3]

- Optimistic unloading with screenshots (this is what we're experimenting with) - we suspend the tab and replace it with a screenshot of the tab before it was suspended, you trigger a reload if you need it. It seems that the screenshot gives you access to the information you cared about while being easy to unload and reload from memory and making it much less likely you actually trigger a reload.

One final one I've been thinking about that I haven't gotten around to testing yet for fast-fan-syndrome (and non-memory limited systems) is to just use renice/cputhrottle (in macOS for example) to force CPU share limits on the processes. This has portability issues and requires certain privileges which is why I'm hesitant to try it immediately.

These obviously have their issues like stopping the JS VM when there might be long running thing that was actually desired (usually prevented with a whitelist).

Happy to test any other ways you think might work!

[1] https://synth.app [2] https://chrome.google.com/webstore/detail/the-great-suspende... [3] https://developers.google.com/web/updates/2015/09/tab-discar...


Why not cache the HTML/CSS instead of using a screenshot? I'm no expert on web/browser development, so I don't know the difficulty or feasibility in caching just the visible bits leaving a static HTML/CSS snapshot minus any javascript seems, but it seems more ideal IMO since you'd still be able to click links.

Just a thought


Good Q! It is something we are looking at/trying. It's a bit more complex as you have to have a pool of suspended renderers to swap the html into as the user switches tabs (the HTML still needs to be properly sandboxed). Then you include static asset loads, etc it becomes less 'instant'.


Screenshots probably would look pretty goofy if the user resized the window between tab unload and reload.



It’s interesting to me that the lack of this feature has been one of the key differentiating features of browsers on desktop OSes compared to mobile browsers, such as Safari on iPads (and iPhones). It’s hard to do serious work on a mobile device that may silently unload a tab with unfinished work just because it was placed in background, whereas desktop browsers somewhat guaranteed that wouldn’t happen.

In a way this change probably narrows the gap between browsers on desktop and mobile OSes. Hopefully this is a good thing, as I expect this implementation will be smart enough not to unload tabs with filled in forms and such.

I could be wrong in this interpretation.


This.

Mobile devices are so utterly unsuited to actual productive use for this very reason. (I'm quite familiar with this, have attempted to use them in this manner for years, and am typing this on a Chrome/Android session I utterly despise.)

The problem extends to other tools -- Termux, useful as it is, also randomly gets garbage collected and killed. Best I can understand, Android actually employs some AI-based memory management whose training goal seems to have been "how to maximally annoy dredmorbius".

Someone's earned their KPI.


It's even worse now that multi-process is a thing even on mobile, because it means that tabs get unloaded not just when the browser feels like it (practical quality of actual implementations might vary, but at least in theory the browser should know which tabs have been recently used, which tabs might be playing audio, etc. and so make a somewhat reasonable attempt of prioritisation which tabs should get unloaded first), but also whenever the OS randomly decides that one of your child processes (containing a random set of tabs) should die.

From following the bug tracker this definitively seems to be a problem with Firefox now – I wonder how Chrome gets around that problem, though? Do they suffer from the same problem, have they found some neat workaround, or are they cheating and being specially whitelisted by the OS?


Yep, this.


It might still happen in the future, but what's described in this post doesn't seem like it's breaking that guarantee: it will only unload tabs that would otherwise have crashed the entire browser, so in cases where that guarantee wouldn't hold already.


I left Firefox for a number of years already. Did Firefox changed its Tab Unloading behaviour? I remember Firefox will unload Tabs that are inactive after a period of time. So having OOM crash on Firefox was a relatively rare occurrence even when I had hundreds if not thousands of tabs.


If you had restore tabs on restart then tabs that were in the background and not pinned would not be loaded until focused. Tabs would not be unloaded unless you restart the browser. The first implementations were in the Fx 20 range and some additional improvements in the 55 timeframe. The feature in 93 is suspending without the need to restart the browser.

https://www.google.com/search?client=firefox-b-1-d&q=site%3A...


I've never seen Firefox unload an inactive tab without my permission, but it looks like according to the docs it's had a 'memory is low, unload tabs' mechanism since 2019. It looks like that behavior was further adjusted in this release, though it's not clear to me what the difference is.


>though it's not clear to me what the difference is

This one works well enough that we can default it on :-)

The previous one didn't reliably detect low memory situations and you could crash with OOM before it ever triggered. The article goes into detail about the various signals that have to be monitored on Windows. We had to do some work on gathering the metrics and correlating with crash data to determine when to trigger.


> On Windows, Firefox gets a notification from the operating system (setup using CreateMemoryResourceNotification) indicating that the available physical memory is running low.

I've longed for such a mechanism in Linux, but I don't think it exists. This should at least be an OS-level signal IMO, though a D-Bus interface could also work. Integrating with one of the recent userspace OOM daemons could be a good idea.


Recent Linux kernels allow you to measure memory consumption from a QoS point-of-view via pressure stall information: https://www.kernel.org/doc/html/latest/accounting/psi.html

This isn't the same thing as detecting how much memory is available because Linux overcommits by default. PSI will tell you when the kernel is swapping too much (depending on the thresholds you set) and from that you can infer the user is running low on memory.

Android's lowmemkiller had an explicit free memory threshold userspace could set to be notified. Starting with Android 11 however it's now using PSI too IIRC.


IIRC on Linux, it overcommits when allocating, so you can keep mallocing memory beyond capacity and it won't actually fail until you go to use that memory.


The GP is describing a signal that your application can react to, not a behavior of allocation failure.

Linux could use some improvement on both. The idea that you always have enough swap and can send everything not used there is wrong. Applications know better how they behave a low-memory than the kernel.


Tabs which get unloaded automatically mean that, when you switch to them, you get a long delay before you can view the tab again, and worse: it makes a new HTTP request, so if you were viewing a Confluence page or something, you will be tracked for reading the page again. So it's not a feature I've ever liked, but I like that Firefox will only unload a tab if it thinks it will crash due to low memory situations because that has never been an issue for me before. It's the main reason I like to use Firefox, Chromium based browsers are waaay too aggressive with this in my experience.


Shameless self-plug: https://github.com/Mic92/chrome-tab-gc (I just ported it from chrome to firefox)


I actually installed Firemin[1] and it really helped getting Firefox's memory usage down (while keeping the browser usable!). Some days I wasn't able to play games because Firefox ate up a large chunk of memory, even though I have 32GB installed!

Its pushing Firefox to purge memory more and more, and it managed to reduce memory usage from gigabytes to under 500MB (used, not allocated).

[1] https://www.rizonesoft.com/downloads/firemin/


Bit off-topic maybe but regarding tab unloading, I have established a pretty solid workflow that lets me keep my thousands of tabs ready at hand, while not bogging down my entire system and keeping me focused on whatever is relevant at the moment.

I use the Sidebery addon for Firefox, set auto-fold to off and unload folded tabs to on. When I'm working on something, I keep all the branches that I need open, and when I'm done with that particular topic, I fold the branch, the tabs get unloaded, and I have a pretty list of squished branches that I can expand and get back to if I so wish. And if I'm really done with one, I can easily bookmark it and put it do "deep storage." It took 15 years of using Firefox but I finally have a tab management system that I'm happy with.


Unrelated, but how do I get Firefox / Iceraven Android to _not_ unload tabs? It's really annoying when I want to load article pages for offline reading then Firefox just decides it wants to load the page again in Airplane mode.


If you mean a current version (i.e. not 68 or earlier), then it's not really possible – both because I think there's no option to configure Firefox's tab unloading itself except by recompiling, but also because now that Firefox loads tabs in separate content process, those separate content processes are an easy prey for the OS low-memory killer. Even the most-agressive memory optimiser won't kill the current foreground app itself, but anything else including content processes for unused (from the OS point of view) tabs may be fair game, even if that doesn't actually improve the ultimate user experience...

If your phone is known for aggressive memory management (https://dontkillmyapp.com/), maybe exempting Firefox from its memory optimisations (if that's possible) might help a little, but no guarantees.


So, if I want to disable this, I should set a big number to the browser.low_commit_space_threshold_mb pref in about:config, right?

I just don't get why this would be useful. When I start Firefox, inactive tabs aren't loaded until I click on them. If something is eating RAM, I can close that tab or close Firefox, and very rarely Firefox would crash. Why would someone like me, that doesn't suspend/hybernate their computer, want this and get a tab unloaded without my explicit will to do so?


>very rarely Firefox would crash

The feature stops (or reduces the likelyhood) of that happening. It literally is made to trigger in a situation where the alternative is to crash.

>So, if I want to disable this, I should set a big number to the browser.low_commit_space_threshold_mb pref in about:config, right?

This will ensure that you crash and have to reload all of your tabs instead of the oldest ones, yes :-)


This is intended for when the alternative is the browser crashing or worse the OS locking up. Your browser exiting unloads _every_ tab.


I get this, but I prefer this tradeoff instead of the browser unloading something I wanted to keep loaded.

When I start Firefox, most tabs (4 or 5 nowadays) won't load, but be there as placeholders for things I need/want to solve through the week (e.g., Amazon search for a gift for my nephew, Youtube list of tutorials). They won't load until I'm ready to use those tabs.

On the other hand, I've had tabs loaded from the start of one session and used sparsely through the day. I would not want those tabs to be unloaded without my consent, even if they are memory hogs, as it would interrupt my workflow. Crashing is fine (and accepted as a last moment failsafe move) by me.


> As long as there is still swap AND physical memory available, there is no problem. If we run out of physical memory and there is swap, performance will crater due to paging, but we won’t crash.

That's a disheartening stance to hear. The browser should be actively evicting work before I start swapping if it's using more than some small percentage of overall RSS. If my IDE decides it needs more RAM for code completion, the browser should play nice rather than slowing my machine to a crawl.


That's definitely something we would want to do, but it requires a (very) reliable measurement method for this kind of memory pressure.

If it's not reliable, the browser unloads tabs when it's not needed, and that's way more annoying.


Just updated Firefox Developer Edition and got this, as well as a new "Colorways" auto-theming feature. Pretty nice, so far!


I'd like it if tabs that haven't been looked at for an hour just closed. Any suggestions on how I can do this?

I think this is a very unpopular way of using tabs though. Most people seem to use it as a sort of work queue and leave tabs open for days or longer. I hate doing that, I'd rather just search for the information again or look in the history.


Web browsers have been trying to imitate operating systems for far too long now. We need to get away with this current model of using a document rendering language such as HTML/CSS and a terrible language such as JavaScript to build applications that feel slower and less responsive than the slowest Windows 3.1-era applications.


This has existed for two years now (option browser.tabs.unloadOnlyOnLowMemory) but someone had to manually enabled it.


It wasn't enabled by default because it didn't work well enough. Getting better low memory triggers was a key to making this an overall benefit, and not just a user annoyance.


Kudos to the devs who fixed it. In my c++ project I was trying for weeks to figure out how to release back to the OS the memory that my std::vector was occupying, only to find out that there is no straight forward way of achieving so.


Detecting low memory scenarios is surprisingly hard on desktop operating systems, but trivially simple on Android/iOS. Firefox for Android already made extensive use of this feature while desktop Firefox' available memory watcher underwent a lot of changes over the years before becoming fairly reliable.


Though unfortunately especially on Android some vendors are overly aggressive in signalling memory pressure, so while the API might be easier to use, the practical result still isn't really good, either, because now instead tabs get unloaded too often. (And the move to multi-process on Android has the unfortunate side-effect that a too-aggressive system OOM killer can now pick out individual content processes and randomly kill tabs without regards to any priority as to which tabs should be unloaded first.)


Small allocations are allocated using sbrk and never truly freed. Larger ones use mmap which gets freed.

Guess the solution would be either preallocating/reserving everything, or maybe using custom allocators that works with bigger chunks


Right curly brace '}'


I wish it was that easy. Destructing of your vectors does not guarantee that the memory will be released back to the OS, and it is not, if your OS is desktop Linux.

See an example here: https://stackoverflow.com/questions/26020580/huge-stdvectors...


This is not a problem a C++ compiler vendor can solve.


Why wait until a crash is imminent? Before I hop on an important video conf I have to remember to open Activity Monitor and manually kill all the FirefoxCP Web Content processes. It crashes each tab and frees up all the memory.


Because for some people their open sites, and the ability to switch quickly between them, is the most important use of their machine and what they want their RAM to be used for.


Will this also be implemented in the mobile browsers (e.g. Firefox for Android)?


I don't think it's necessary because Android has its own OOM killer and Android apps must be written to handle Android's OOM signals.


Firefox for Android has already had this feature for a few years.


> trigger the Firefox-internal memory-pressure warning allowing subsystems in the browser to reduce their memory use.

If the sub systems can reduce their meneory use why not do that by default?


It's a classic performance/memory tradeoff. There are caches that aren't strictly necessary for the page to work, but throwing them away causes slowdowns.


"This feature is currently enabled on Windows and will be deployed later for macOS and Linux as well"

Look forward to trying this out when it becomes available for an OS I use.


One reason why it shipped on Windows first is that the situation is more serious there. The article goes into details why the different overcommit behavior is more problematic on Windows, and you're more likely to OOM there as a result.

Getting macOS to OOM is actually pretty difficult, we probably want to unload tabs before that point for performance (swap!) reasons, but that's also harder to measure very reliably.


Or you know you could just if (!malloc_tab()) do_unload();. But that assumes firefox wasn't coded with malloc can never fail.


That's basically what they're doing, except that they're watching for low-memory even if it's not actually Firefox that's doing the allocation.


Someone should tell all these guys about the memento design pattern.


It'd be great if this was tunable and usable in non-OOM scenarios.


It is if you add Total Suspender.


I just tried it out, but it doesn't work the way I hoped it would.

I was hoping for some kind of SIGSTOP equivalent on any JavaScript when the tab doesn't have focus (without unloading anything). Instead, it basically closes the tab but leaves it on the tab bar, and when you return to it the tab gets reloaded.


I know what you mean, and yeah unfortunately it doesn't work that way. I have js disabled on almost everything anyway, but having a way to pause js would indeed be delicious.


Total suspender is great not just for memory but for CPU. I reduced a lot of unnecessary CPU consumption by having the tabs not in focus frozen after a few minutes.


> "On Windows, out-of-memory (OOM) situations are responsible for a significant number of the browser and content process crashes reported by our users."

You got this wrong, yet again. What causes the memory to run out in the first place? That is what you should be fixing.


> What causes the memory to run out in the first place? That is what you should be fixing.

Either the user opened enough tabs to use memory, or the rest of the system is using too much memory. Neither of those is "fixable"; a browser that randomly closes your tabs or kills other programs is not going to be well received.


Or one tab starts leaking memory like crazy after some time (looking at you Jenkins).


Surely you must admit that even an extremely memory efficient implementation of a set of tabs has a physical limit on how many can be open if they’re all loaded into memory.


Why do computers keep getting more and more memory? 640KB should be enough for everyone, if people would just fix whatever is using up all the memory. /s

Not all OOM situations are because of a malfunction or leak.


Let's say you want to have a wallpaper on your 1920x1080 desktop. At 24bpp, that's ~6MB right there.


I've added a sarcasm indicator to my post to clear up any confusion. The point is that there are lots of valid reasons to use an unbounded amount of memory, and it's reasonable to expect unbounded-memory-using applications to have mechanisms which free that memory over time without direct user intervention (eg, manually closing a tab).


I have approximately 300 tabs open. How much memory should that use? What's your answer based on?


You seem to assume it comes from the browser. That is not necessarily the case: the user might have launched a demanding game that suddenly increases memory pressure, making Firefox OOM. FF will now more gradually release memory to the OS.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: