Chrome has a task manager that you can use to kill a stalled tab. The OS has a task manager that you can use to kill a stalled browser. You are never forced to use the power button and lose work.
Reality: the task manager will not open because there is not enough RAM. Simply moving the mouse pointer can become impossible.
Attempting to close a window goes like this: estimate the mouse movement needed, carefully move the mouse, then come back in 15 minutes to see if the pointer has moved and if it is in the correct location. If it has moved but not as desired, make another attempt. If it hasn't moved, come back in an hour... then try several hours, or maybe the next day. If somehow the mouse is in the correct location, click the button very slowly. Maybe hold it for minutes or hours?
Might be worth turning off virtual memory? I believe that is an option in all the major OSes, and it can help you budget your memory usage as well as avoid a swap lock-up. Is the underlying problem that your machine has just has too little memory for today’s OS & browser versions? Or you’re visiting a specific web site with a memory abusive app? It sounds here like there are important details you haven’t mentioned yet, not that there is a general problem with browsers necessarily. Yes, browsers and today’s OSes and applications all seem bloated from a user perspective and seem to use enormous amounts of memory. I have run out of RAM before and had to wait for VM swap, and agree it’s very painful. But I haven’t had that happen with a browser in years or maybe ever, and nobody I know is having common browser freezes. Is it worth an SSD & RAM upgraded, might that solve the issue?
It's an 8 GiB machine with an SSD. I open lots of tabs, in lots of browser windows, on lots of virtual desktops, but so what if I do? It's still unacceptable to lock up.
If I visit a specific web site with a memory abusive app, the browser is supposed to protect me. It's the same as any security hole. Malicious web sites aren't supposed to crash my computer.
Yes, I'm still blaming the browser. It's the browser's job to provide protection here. It's a security matter. No matter what my browsing habits may be, letting the computer lock up is not at all OK.
We shouldn't be one bad web site away from swap lock-up.
There is no possible computer upgrade that will fix the issue. There will always be a more-terrible web site waiting to consume all resources.
If it’s unacceptable to lock up, then turn off virtual memory. Swap is not a security hole, it’s a feature doing exactly what it was designed for. Swap is the explicit design tradeoff of the system you bought, and it’s the default behavior because most people prefer that their system work slowly to a system that stops working. Fortunately it’s an optional feature, and you can turn it off.
> I open lots of tabs, in lots of browser windows, on lots of virtual desktops, but so what if I do?
Hehe, the expected outcome of this behavior on an 8 GiB machine with default settings is a slow computer. You can blame the browser and spend your time frustrated if you want to, or you can choose to avoid asking the computer to use 20 GiB and then complain when it swaps, by requesting less memory and/or disabling virtual memory. It’s not that fair to go on and on about some vague abstract idea of malicious web sites and blaming the browser for not protecting you, if you are choosing to open lots of windows, browsers, desktops, tabs, and web sites.
> It’s the browser’s job to provide protection here.
If you study the browser design, and if you compare today’s browsers to those of 5 or 10 years ago, you will find that all the browser devs are actually bending over backwards trying to help you. They’re not perfect, but all of today’s browsers are pretty amazing in how well they handle low resources - but - the browser is just an application that does what it’s asked to do. If you use a web app that consumes 1GiB, the browser tries to accommodate your request. How is it supposed to know you want it to cut off the app instead of do what you asked? What if the app asks for more memory in the middle of what you’re doing, do you want it to lose your work??
The OS is the software locking up your computer, not the browser. Everything you’re talking about can and does happen with regular applications. Even if you got your wish of a browser that protected you from yourself, it wouldn’t solve the problem that landing in swap locks up the machine.
> There is no possible computer upgrade that will fix the issue.
I disagree completely. I never have the problem you’re talking about, and I use dozens and dozens of tabs all day long every day with multiple browsers. $100 in RAM right now could double or triple your capacity, if you don’t want to disable virtual memory nor change your browsing habits.
Yeah there is no solution to fixing the theoretical problem that some software somewhere can ask for more resources than you have. That’s not the issue you brought up though. In practice, the issues you’ve raised about browsing are quite easily fixable.
"100$ in RAM" - maybe learn what its like to live on most of the planet instead of your tiny walled garden.
There is a way to limit this, and also to provide feedback to the user about what is going on such that the system never swaps or freezes. Instead we get lazy intellectual excuses from the likes of such as yourself.