402 points · by mthermidor · 5y ago · 275 comments
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.
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.
That tab is then lost forever, unless I can find it in the history from whenever I had opened the tab.
A recipe for disaster.
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.)
SPAs and infinite scroll are (maybe) bad, but not the cause of this problem.
[] https://addons.mozilla.org/en-GB/firefox/addon/auto-tab-disc...
I think it's only supported on Chrome for Android right now.
[0] https://chromium.googlesource.com/chromium/src/+/refs/heads/...
- 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)
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.
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.
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.
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 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!
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
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 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 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.
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!
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 :)
I didn't even know this was possible.
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.
Opera does indeed have switch to tab, FYI - and open tab searching.
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.
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.
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.
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.
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.
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.
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 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.
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.
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...
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.
Try Edge, the collection feature is a game changer.
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 :)
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.
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 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?
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!
'Other Window'. Can't live without it.
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.
Select all tabs.
Bookmark tabs...
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
[1] https://www.mozilla.org/en-US/firefox/93.0/system-requiremen...
I've got 99 problems with Firefox, but a crash ain't one.
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.
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...
Firefox should literally never crash. If it does, that's a serious bug (but especially on Windows, not necessarily in Firefox itself).
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
I still use it because it's better than Chrome, and I wouldn't touch Brave with a 10 foot pole.
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.
Firefox should literally never crash. If it does, that's a serious bug (but especially on Windows, not necessarily in Firefox itself).
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.
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.
https://addons.mozilla.org/en-US/firefox/addon/tree-style-ta...
As the article explains, if you have enough swap you'll never trigger this. It activates right before you'd have crashed otherwise.
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...
Just a thought
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.
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.
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?
https://www.google.com/search?client=firefox-b-1-d&q=site%3A...
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.
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.
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.
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.
Its pushing Firefox to purge memory more and more, and it managed to reduce memory usage from gigabytes to under 500MB (used, not allocated).
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.
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.
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?
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 :-)
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.
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.
If it's not reliable, the browser unloads tabs when it's not needed, and that's way more annoying.
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.
Guess the solution would be either preallocating/reserving everything, or maybe using custom allocators that works with bigger chunks
See an example here: https://stackoverflow.com/questions/26020580/huge-stdvectors...
If the sub systems can reduce their meneory use why not do that by default?
Look forward to trying this out when it becomes available for an OS I use.
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.
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.
You got this wrong, yet again. 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.
Not all OOM situations are because of a malfunction or leak.