Sometimes—especially when you have a lot of tabs open and a lot of pages running Flash—Safari can hang to the point where it needs a restart. Unfortunately, restarting Safari can be inconvenient. Thankfully, Mac OS X Hints readers glenbo and dogboi shared a way to restart the Flash plug-in instead:
You will need to use the Terminal to quit the
WebKitPluginHostprocess. When Safari sees that this process has died, it automatically restarts it. Refreshing a page that was using the Flash plug-in will then reload it.
Open the Terminal from the Utilities folder in /Applications and type
killall -9 WebKitPluginHost
Then go back to Safari and refresh any pages that were using the Flash plug-in. I have had Safari doing the Beachball of Death and used this trick, and it fixes it immediately. Try this whenever Safari gets slow or freezes. Flash 10.1 does appear to have improved the situation somewhat, but hasn't eliminated it.
Note that this command kills all Safari plug-ins, not just Flash. Other plug-ins should start back up when you reload the page; just make sure you don't kill something that you don't want to.