The door is closed. Is the refrigerator light on? [Firefox memory usage question]

Let’s say I have 12 tabs (Firefox) of websites on my MacBook. Now some of these sites have ads and there are things (videos?) moving, and lights flashing. Star bursts, attention getters, etc. Are these things moving, when they are not opened, or clicked on, i,e visible? If so, does this background stuff eat up the CPU? As always, thank you.

The short answer, yes.

For some browsers windows that do not have focus are given different task priorities to help keep them from swamping a computer but try opening a FB game like farmville in a tab and open a new tab and open another game, memory and cpu usage ramp up dramatically.

:smiley: Great subject header.

open a few tabs. go to one tab and start a video with audio playing so you can hear it. move to another tab and find out if you can hear the sound. also if the video is a known length is the progress bar at the same time as when you left it?

Yes they are all running. It’s actually possible to view hidden windows and tabs as they operate, although there’s no easy process for doing so that I know of.

The above processes (video, Farmville) generally are still usually flash based. It is up to the flash developer to respond to a window losing focus, and with flash alone there are only semi-reliable ways to even know if the window had lost focus.

Outside flash, depends on browser and os. As said above, priorities are reallocated when the window is not front and center. Don’t know if anybody completely freezes javascript, but any reasonably good js developer should know how to go into quiet mode when a window loses focus.

Far extreme: my Android cuts off downloads when I leave at least the browser (Any Internet-capable app? Don’t know yet). Worth my time to take a look at what happens to javascript.

Yes, johnpost, I have noticed that if I am receiving a youtube and change tabs, I can still hear the youtube. But what I don’t know, for example, I am on yahoo, and thanks to yahoo, they are providing me with info from sites that I have visited and they are encouraging me to purchase items. They have stuff moving. I don’t know the correct terminology, but the screen has action. Are these “things” continuing when it is not open?

Gracias TriPolar. This is GQ, so you are confident in your response? No cite needed.

Yes. There are desktop sharing systems that restrict the view to only certain browser windows. I’ve watched a browser window operate while the remote user had another application covering it on his screen.

[ol]
[li]Open the refrigerator door.[/li][li]Set your phone to film a movie.[/li][li]Point the phone at yourself and smile.[/li][li]Put the phone in the refrigerator.[/li][li]Shut the refrigerator door.[/li][li]Wait a second and open the door.[/li][li]Remove the phone and watch the movie.[/li][li]Did the light go out and come back on again? There’s your answer.[/li][/ol]

It is possible to write animation code that pauses or slows down when the window is not visible, but most developers don’t bother.

I believe Chrome slows down certain types of Javascript animation and background processes on hidden tabs. I’m not sure if other browsers do. It’s also possible that some browsers pause animated gifs when they’re not visible, though I can’t confirm that one way or another.

Interesting, as I was just going to post this query about fees.

So, when the door’s closed, you still are being charged, because data’s zipping your way.

Sounds like a trick question, you could be talking about the front door, or the barn door or the car door…

I think it depends on the type of animation and programming used. Mozilla documentation says a “repaint may occur up to 60 times per second for foreground tabs, but may be reduced to a lower rate in background tabs” and here is a discussion on a javascript site talking about how animations stop when the screen is out of focus. This is apparently expected behavior. So depending on the animation and/or programming being used, some animations could stop when not being viewed.

Here is the experiment I did:

— Open refrigerator. Observe that light bulb works (i.e., is illuminated).
— Remove bulb from refrigerator, so I can continue to observe it when door closed.
— Close refrigerator. Observe bulb. It was not illuminated.
— Open refrigerator. Re-install bulb. Bulb is now illuminated, proving that I did not damage it in removing it.

[moderating]
I love the thread title, but we do want to have titles in GQ that explain what the thread is about. I’ve added a parenthetical to the end of the title clarifying it.
[/moderating]