On my new MacBook I've noticed that quite frequently Safari stops executing the JavaScript on a page. So many Web 2.0 websites rely heavily on JavaScript for functionality that this results in many buttons and links on a webpage doing nothing when clicked. In GMail this results in not being able to read or delete anymore messages; in Flickr, the drop down menus stop working; for twitter, the update button no longer sends and update. I can't say for certain, but it seems like this usually coincides with use of a google website (gmail or google analytics).
While searching for what could possibly be going on here, I ran into this blog post suggesting a possible fix to JavaScript not working in Safari. Like me, the author has the debug menu enabled in Safari. The suggested fix of clearing out the log messages in the console did not work for me. (Which by the way, I had over 300K JavaScript error messages on a computer that's less than a month old and not used that often.) What seems to have worked is turning off Enable Runaway JavaScript Timer (also located in the debug menu).
For those not familiar with Safari's debug menu, it provides access to a lot of features for developers -- changing user agents, inspecting the DOM, getting access to JavaScript error messages, etc. In order to enable it, quit safari, open a terminal window and type
% defaults write com.apple.Safari IncludeDebugMenu 1
chnging the 1 to 0 will disable the menu.
