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

Restart the Flash plugin without quitting Safari Web Browsers
Safari will often get stalled out and need to be restarted. In many cases, this can be traced to the Flash plugin getting overloaded. You can quite simply restart just the Flash plugin and make Safari work properly again.

You will need to use the Terminal to quit the WebKitPluginHost process. Safari sees that this process has died and automatically restarts it. Refreshing a page that was using the Flash plugin will then reload the plugin.

I have had Safari doing the beach ball of death and used this trick and it fixes it immediately.
  • Open the Terminal from the Utilities folder in /Applications
  • Type ps -ax | grep WebKitPluginHost
  • This will return something that looks like this:
    16154 ?? 11:37.18  /System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app/Contents/MacOS/WebKitPluginHost
  • Take the PID (Process ID) and kill it. It will be different each time. In the example above it is 16154.
  • Type kill -9 16154 (substituting the correct PID).
  • Go back to Safari and refresh any pages that were using the Flash plugin.
  • Try this whenever Safari gets slow or freezes with the beachball. Flash 10.1 does appear to have improved the situation somewhat, but hasn't eliminated it.

[crarko adds: I tested this, and it works as described. Killing the WebKitPluginHost task will terminate all Safari plugins, not just Flash, so be aware of that. Other plugins should also reload as required after the process restarts.]
    •    
  • Currently 3.58 / 5
  You rated: 2 / 5 (12 votes cast)
 
[36,319 views]  

Restart the Flash plugin without quitting Safari | 17 comments | Create New Account
Click here to return to the 'Restart the Flash plugin without quitting Safari' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Restart the Flash plugin without quitting Safari
Authored by: dogboi on Sep 21, '10 08:10:23AM
As a Unix wonk on Twitter reminded me, the following much shorter command will also work:

killall -9 WebKitPluginHost

One line is much better. :-)

[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: glenbo on Sep 21, '10 03:14:24PM
I like the killall -9 trick. I was looking for a way to do that, but didn't realize that killall worked with -9. That explains why killall WebKitPluginHost never worked for me. :-)
---
0100011101000010


[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: pepijndevos on Sep 21, '10 08:15:41AM

An easier way to do this is using Activity Monitor. Just search for Flash and click Quit Process and then Force Quit.

http://img.ly/27qb



[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: morespace54 on Sep 21, '10 08:59:46AM

I like this way better because when my Safari hang, I don't always have the time to fire-up Terminal, type in the command, get the PID and type the kill process command line. Often, Safari will be crashed by then...

Edited on Sep 21, '10 09:00:50AM by morespace54



[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: KesslerPeak on Sep 21, '10 08:28:53AM

Oh, but command-line is so much more fun!

Here's a shortcut to the original hint so you don't have to deal with the pid #:

killall -9 WebKitPluginHost


[ Reply to This | # ]
Potentially easier ways
Authored by: snivels on Sep 21, '10 08:32:45AM

This is perhaps a bit obvious, but I thought I'd throw it out anyway.

A one-step way to do it from the command line:

killall WebKitPluginHost

And you can hang a menu option off the scripts menu by making a script with the line

do shell script "killall WebKitPluginHost"

And saving it in the Safari scripts directory.



[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: asmeurer on Sep 21, '10 09:11:30AM

You should also install the Click to Plugin Safari extension and prevent those nasty extensions from loading in the first place. It makes webpages that have too much flash (like in ads) way faster.



[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: alansky on Sep 21, '10 09:15:45AM

Oh yeah... This is much easier than simply restarting Safari... NOT!



[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: fracai on Sep 21, '10 09:17:06AM
Forget the command line hackery and just install BashFlash. It sits in your menu bar and turns red when Flash is getting greedy. You can then kill the plugin right from the icon.
---
i am jack's amusing sig file


[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: DanFrakes on Sep 21, '10 10:19:06AM
Agreed. We covered BashFlash over on Macworld.com earlier this year.
---
Dan Frakes / Senior Editor, Macworld


[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: koen on Sep 21, '10 03:09:52PM

Unfortunately, BashFlash only works on 10.6 and later.



[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: GerryA on Sep 21, '10 10:24:42AM

Hmm. Maybe what I'm doing doesn't work, but it seems to: I copy the URL, close the tab, open a new one, paste in the URL, and it then works just fine. Saves opening up the terminal. I've not checked whether I'm leaving the hung process still hung, or whether this kills the process. Either way, I get to see whatever it is I'm trying to see!



[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: glenbo on Sep 21, '10 03:12:38PM

I didn't get a notice that my hint got added. yay! I had some more tweaking to do, but pressed return once by accident and it submitted it instead of previewing it.

This hint isn't going to be perfect for everyone, but once I found it it made my life a lot easier. I for one hate restarting Safari. I routinely have about 15-20 windows open each with about as many tabs. Most are in a state where it would be a big pain to restart Safari entirely. I also never restart Safari for months at a time, so it gets a little antsy. Doing this is a way to give me time to quit Safari gracefully and save whatever work or bookmarks I had open.

--glen

---
0100011101000010



[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: regulus on Sep 22, '10 02:11:33AM
Here's a little applescript to make the process easier. It quits the plugin then reloads the frontmost tab in Safari.
-- kill the process
do shell script "killall -9 WebKitPluginHost"
delay 1

-- reload safari
tell application "Safari" to activate
tell application "System Events" to keystroke "r" using command down
---
Hank
http://www.hamsoftengineering.com


[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: koen on Sep 26, '10 08:05:27AM

I think 'WebKitPluginHost' exists on 10.6 only, can anyone confirm that? That would explain why BashFlash is 10.6 only as well.



[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: littlebigman on Dec 15, '10 01:08:04PM

I can confirm that this hint doesn't work for 10.4 Tiger on PPC (still on an old G3 iBook), after entering the "killall -9 WebKitPluginHost" I get this reply in Terminal:

"No matching processes belonging to you were found"

So I have just permanently unplugged Flash. Much better performance! And I can always used the "masquerade as iPad" trick to force HTML5 video when needed.



[ Reply to This | # ]
Restart the Flash plugin without quitting Safari
Authored by: paulbeard on Oct 09, '11 11:34:00AM

what do you mean "open the Terminal?" Who doesn't have it open already?

I didn't realize there still so much fear and loathing associated with the command line. It's just a tool, after all. I'd be lost without it and I see it as a key differentiator against Windows (can you actually do anything useful in that command shell?).

Good tip: I had wondered what process needed to be smacked when Safari bogs down. WebContent doesn't seem to do much other than force a reload of all tabs.



[ Reply to This | # ]