Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Reduce battery usage by controlling Flash in Safari Laptop Macs
If you use Safari and a laptop, you may be surprised to find that sites that incorporate Flash may be draining your battery. Unless you're one of those people who browse with Activity Monitor open, you're probably not aware that many sites are sucking your battery dry. Many sites incorporate Flash, in particular to display advertisements. These little Flash tidbits may be poorly written, and can make your CPU work really hard. This, in turn, will drain your battery at a fast rate.

You can prevent Flash from automatically loading in Safari using Safari Stand. Install it, launch Safari, go to the Stand menu, choose SafariStand Setting, then click on Advanced. Check the Load Plug-in Manually box in the Flash section and restart Safari.

Now when your browser encounters Flash, you can click the box where the Flash would have been to load that bit of Flash. You can also add exceptions to the site alteration area -- for example, you might want to let Flash automatically load when you visit youtube.com. (This tip originally appeared on my blog.)

[robg adds: Many of the browsers offer some sort of Flash controlling plug-in. With Firefox, I use FlashBlock to control how Flash behaves.]
    •    
  • Currently 2.75 / 5
  You rated: 4 / 5 (12 votes cast)
 
[50,138 views]  

Reduce battery usage by controlling Flash in Safari | 32 comments | Create New Account
Click here to return to the 'Reduce battery usage by controlling Flash in Safari' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Reduce battery usage by controlling Flash in Safari
Authored by: hypert on Jul 07, '08 08:06:07AM

I didn't know Safari Stand had a Flash blocker - thanks! It's easy to allow Flash to play on any given site you come across, and that Site Alteration stuff looks pretty easy too.

Does Flash use 100% CPU in Safari for everyone else too?!?



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: hypert on Jul 08, '08 05:06:09AM

A bit off-topic, but does anyone have any better suggestions on using SafariStand's Site Alteration to re-enable Flash on some sites? For example, I like Amazon's Flash music preview tool (it doesn't use 100% of my CPU!), but I can't get a simple Site Alteration to re-enable (Flash) plug-ins on that site.

Has anyone else done this for Amazon?



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: Cameroon on Jul 08, '08 02:55:35PM

The matching is a regular expression. For instance, to match anything (well, any http content at least) at macosxhints.com you'd need the following:

http://.*\.macosxhints\.com/.*

So I think you could have the "Load Plugin Manually" checked globally, then have a Site Alteration rule that matched http://.*\.amazon\.com/.* and the checkbox next to "Load Plugin Manually" unchecked.



[ Reply to This | # ]
Correct SafariStand Site Alteration settings
Authored by: hypert on Jul 09, '08 09:55:46AM

Thanks!



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: NovaScotian on Jul 07, '08 08:15:06AM

Certainly not for the average Mac user -- I haven't a clue how to install it, don't know what SIMBL is, let alone how to use it.



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: diamondsw on Jul 07, '08 08:24:45AM

Note this is yet another InputManager hack, so give careful thought to it before you use it.

And when an OS or Safari update comes out, don't you DARE report problems with it until removing all such hacks first.



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: goatbar on Jul 07, '08 08:44:49AM

MenuMeters provides a nice alternative to the Apple ActivityMonitor. Much less intrusive and I catch run away programs both through CPU usage and network traffic.



[ Reply to This | # ]
alternatives to SafariStand?
Authored by: SuperCrisp on Jul 07, '08 08:52:55AM

I recently went through a lot of trouble to track down a problem that turned out to have its source in SIMBL. Is there an alternative to SafariStand out there? I already use Safari Block on a site-by-site basis, but I'd like something equivalent to the global click-to-play that FlashBlock offers in FireFox.



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: paulsomm on Jul 07, '08 09:54:39AM

Nice. This was one of the reasons I stuck with Firefox (flash blocking, but also ad-block) b/c I had indeed noticed this (not just with Safari, but Firefox and IE have the same issue, so its definitely Flash).

Thanks for the hint.



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: nickull on Jul 07, '08 10:59:59AM

Not to be too pragmatic, but the following is true:

"Anything that uses more CPU will eat your battery faster"

Compared to turning off Airport when not using it and dimming your screen, the amount of time you save blocking Flash will likely be minimal.

I assume you have also done testing to back up your statement? Can you share with us where the break even point is between the amount of CPU energy Flashblocker uses and what size of SWF file (raw size, stack/heap profiles, threads and CPU usage) it takes to create positive and negative experiences from blocking Flash? Are there lessons to be learned for Flash developers to create more eco friendly flash experiences? This would be of major interest to a lot of people.

/duane
(Disclaimer: For sakes of transparency, I do work for Adobe)



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: bradford653 on Jul 07, '08 12:13:53PM

Nobody's pointing fingers at Adobe or the Macromedia guys. The fact is that there are just quite a few Flash developers out there who design Flash animations that peg your CPU. There are definitely good Flash developers out there as well, but they seem to be in the minority.

I do want to argue your point that a pegged CPU doesn't chew up battery, as it most certainly does. Not only does the processing itself require more electricity, but the resulting fan RPMs that kick in after the CPU has heated up beyond its cooling threshold also sucks quite a bit of charge from the battery.

If I walk by my wife's PowerBook and hear the fans blowing, I'm almost 9 out of 10 times correct in assuming that she's left Safari pointed at a web page that has one or more flash instances on it. I've had to train her to leave Activity Monitor on and to watch the dock icon for a big green box which reminds her that she's got a web page open that's overheating her computer and significantly reducing both its immediate performance and its overall lifespan.

The fact is, my wife "shouldn't have to" worry about these things. All of her other applications behave perfectly well. Perhaps some fingers should be pointed at Adobe for not designing safeguards into the Flash player to avoid this particular problem... as it's definitely a widespread issue.



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: hypert on Jul 08, '08 05:15:09AM
Try http://www.howcast.com/videos/17502-How-To-Throw-Knives. For me (Safari 3.1.2, Mac OS X 10.4.11, G4 1.25GHz), that page uses 100% of my CPU until I close the page.

I've seem similar pages that use less CPU when opened in Firefox, although that one seems to be the same in both browsers.

[ Reply to This | # ]

Adobe Guy Wades In, Demands Test Results.
Authored by: Anonymous on Jul 08, '08 01:09:25PM

Hey Adobe guy! Let me know where you get your batteries that are immune to increased CPU usage, will you? You might want to patent the idea...

Despite your whining, most of the Flash developers out there couldn't code their way out of a paper bag. Whatever Adobe's official line, Flash was never meant to be such a pervasive medium (same as Darpanet, Unix, ethernet, SGML, the Web, MS-DOS, etc.).

Now that it is so pervasive, it's Adobe's responsibility to ensure that CPU usage is kept to a minimum when something is published to the Web. This can be done through various means, the most obvious of which is to provide developers with a CPU wastage meter. Another technique would be to always launch the Flash Player with a low priority so it doesn't suck so much power.

Flash is great, when it's used properly. And no, YouCompleteTube is not proper usage of streaming movies in Flash -- that feature is better used for adding movie clips to some larger presentation.

This is why so many people use Flash blocking technologies. We're sick and tired of it, and it adds nothing of value to the Web, thanks all the same.



[ Reply to This | # ]
Adobe Guy here....
Authored by: nickull on Jul 08, '08 02:18:46PM

I agreed with you that any increased CPU usage uses more batteries. My exact statement was/is:

"Anything that uses more CPU will eat your battery faster"



[ Reply to This | # ]
Adobe Guy here....
Authored by: bradford653 on Jul 08, '08 08:26:41PM

Actually, you followed that up with:
<blockquote>"Compared to turning off Airport when not using it and dimming your screen, the amount of time you save blocking Flash will likely be minimal."</blockquote>

Here's the thing... you dim your screen to nearly nothing and turn off your wireless card, and you've essentially rendered your laptop useless. Networking and being able to 'see' the stuff we're looking at are expected of our computers. Yes, I know, it sounds crazy to expect that a computer function as it was meant to.

The only time that I find it reasonable to turn off my wireless card and dim my screen are on transatlantic flights, because I *know* my battery won't make it past four hours, and that I won't have the opportunity to plug in for a while. I expect that I'll probably have to change batteries half-way through the flight.

On the other hand, what we DON'T expect is that the most seemingly benign piece of content on our screen consumes more CPU cycles and battery charge than any other aspect of our computer's hardware, and for absolutely no perceptible benefit or reason, and for those many of us who slip our laptops out at starbucks to work for a couple of hours, it shouldn't be much to expect that our battery last for the duration.

And yes, a Flash instance that pegs your CPU will exhaust your battery far more rapidly than leaving your screen on full brightness while your airport card is operating. Please don't try to tell those of us who are victims of Flash anything otherwise.



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: WaltFrench on Jul 07, '08 01:36:31PM

Duane, I have seen FT.Com, a Financial Times website, eat up ALL of my available CPU. Not having the tools mentioned, I can't say that it was the hyperactive Flash ads, but with my limited ability to read source, I couldn't see anything else likely. Closing the page put CPU level at near-zero; re-opening it or another FT.Com article and we're off to the races.

I complained to the webmaster, got no reply and just don't go there any more, so can't say it's still a problem. Not exactly a traffic enhancer, tho.

There is lousy quality control of Flash, and with the <b>very uneven implementation across different browsers</b>, even reasonable attempts to proof displays mightn't catch the horriffic results that some subtlety caused.



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: nickull on Jul 07, '08 04:05:40PM

Agree. Like any technology, it can be used for good or evil, written elegantly and efficiently or produced in steaming piles of butt-ugly code. I have seen some really bad flash coding but this is not unique to flash. One can also create abusive HTML, AJAX or even graphics. One guy once made a JPG by creating an HTML table that loaded individual pixels of different colors. <belch>!!

Unfortunately, there is no real way to avoid people doing bad things. My group (Adobe Evangelism) really tries hard to promote proper code practices and usage of the Flex Profiler so developers can see what memory they are consuming. We have tons of workshops for people to share (not just Flash but HTML, Cold Fusion, PDF, CSS, and just about every other standard.

I think the base of the problem is that the tools make it so easy to create Flash sites now that people who haven't taken the time to understand how the Flash player works at runtime are just doing stuff the way they can get it done and not optimizing the code. I'm guilty of this. Seems like an optimization suggestion tool for multiple technologies would make a lot of sense. Sometimes the issue is caused by sites that also use combinations of technologies or have too much remote loading etc too.

Duane



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: CajunLuke on Jul 07, '08 04:26:47PM

The Hulu video player keeps my Core 2 Duo 2.16 GHz MacBook Pro at ~70% on both cores, giving me about 2/3 of my normal battery life. Not exactly scientific, but Flash can make a difference.



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: CajunLuke on Jul 07, '08 04:30:27PM

Sorry, meant to reply to the post immediately above grandparent on main page. Just an example.



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: Anonymous on Jul 08, '08 01:11:11PM

On FT.com, it's Apple's lousy Javascript engine that sucks. All your available CPU power. Same happens when you open "Dash"board.



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: nickull on Jul 08, '08 02:20:52PM

Somebody should make a code optimizer reporter for all web technologies. The problem is just going to get worse with JavaFX, Silverlightm, Curl and others. Imagine some dumbass using all of these plus flash and remote objects on one page?

<GAH!>



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: thehigherlife on Jul 07, '08 01:41:45PM
you should check out http://www.ragingmenace.com/software/menumeters/

it puts nice graphs and stuff in your menubar to see when rogue programs aren't behaving as expected.

[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: meikokun on Jul 07, '08 02:02:57PM

if you're just using stand to block flash, you're missing out on its ability to download those cheesy '80s videos from youtube with a simple cmd-click on the video (you'll need perian to open the flv in quicktime - abooby's flash viewer is another resource hogging joke).
Not to mention the find-by-typing feature. Love this no end.
The quicksearch function is great too. No longer am I forced to search in google worldwide, I can type un the url box 'g ....' and anything after the g space gets looked up in google uk, or whatever. Set a whole load for whatever you like.
That's only three more of the many goodies.

And with regards to menu meters - I've been a big fan for a long long time, but recently moved to the even more excellent istat menus. Check it out, then take yer choice.



[ Reply to This | # ]
To accomplish a similar thing in all browsers
Authored by: ttt on Jul 07, '08 03:48:40PM
I use the zap plugins bookmarklet. I think it's more fair (and less of a hack) because it at least gives sites a chance to use Flash without annoying the hell out of me. If not, their Flash is gone with one click in my bookmarks bar.

[ Reply to This | # ]
To accomplish a similar thing in all browsers
Authored by: Anonymous on Jul 08, '08 01:14:02PM

What an odd viewpoint. It's not the user's place to be "fair" to resource hogging developers. With your method, you're still downloading all the cruft...



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: nickull on Jul 07, '08 04:11:34PM

I think the easiest way to block flash is to totally disable JavaScript. Most (if not all) Flash is usually loaded with javaScript and by disabling javascript, you can also block AJAX and other frilly dynamic page, CPU wasters. A lot of the old school DarpaNet guys still use text only for browsing (hence the alt tag for images is still relevant).

Another alternative to extend battery life is to turn your airport off, screen brightness way down and close all programs you don't need. I think I remember someone once claimed lower screen resolutions also helped out a lot (640 * 480).

Cheers!

Duane
(Disclaimer: For sake of transparency, I work for Adobe)



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: lukec on Jul 08, '08 07:23:58AM

Those are definitely great ways to improve your battery life, but you probably won't be able to get to too many web sites with your airport turned off. Flash generally eats a lot more CPU on the mac than in Windows, so maybe that's why this affects us so much (although I hear performance improvements are coming).

An active CPU eats a lot of battery and with all that heat comes an active fan, which can also contribute to battery drain. I don't think flash is the only offender, an errant javascript could also cause the same problem. It boils down to misuse and abuse of technology.

Seeing my CPU at 30% usage because I have a few pages open in the background is annoying. Right now my CPU usage is 5% with flash disabled. That probably means 30 more minutes of working without being plugged in.



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: nickull on Jul 08, '08 02:11:49PM

I should have clarified. Obviously disabling Airport would not let you see the flash (or anything else from the web) unless you are hard wired with ethernet. Still - I do see a lot of Mac users at the airports using an ethernet cable with no power and running their airport.



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: ttt on Jul 08, '08 02:08:50PM

Yes it gets downloaded, but 90% of the time that's not a problem during my regular browsing. If Flash were too annoying, I'd just turn off all plugins rather than use the suggested hack. It'd be nice if Safari allowed more fine control of plugins (and cookies), but until it does I was simply offering the solution that I found the most useful.



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: haloici0us on Jul 08, '08 06:56:12PM
For individuals like me with a little MacBook with graphics processing integrated into the computer's CPU, my computer will sound like a screaming banshee when most any Flash is viewed in Safari OR Firefox.

There is a MacBook Pro in this dwelling that sounds similar, but I believe it's the graphics card's own fan making the jet-taxiing noise.

This plug-in worked really well in Tiger, but the guy doesn't seem to be developing it anymore.

http://web.mac.com/jrc/SafariPlus/


[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: jon.pdx on Mar 22, '10 03:23:44PM

Don't forget that you can simply uncheck the enable plug-ins in the Security Tab of Safari's preferences (v4.0.5). While this is not the most flexible option, it might work for some people.
----
I just got rid of an SIMBL password plugin/app and didn't really want to install it again to control Flash. I'm not sure if it was slowing down my system or not, but things seem better now. Perhaps I had an older version... Apparently the architecture changed with Snow Leopard and 64-bit apps.

Personally, I wish that Safari had more of a plug-in architecture so that people didn't have to come up with work arounds like SIMBL to modify Safari's behavior. Although, what I like about Safari is that it is clean and simple....



[ Reply to This | # ]
Reduce battery usage by controlling Flash in Safari
Authored by: johnsawyercjs on Apr 01, '10 04:21:13AM

Another handy Flash blocker is ClickToFlash.



[ Reply to This | # ]