If youre using Safari:
To just empty the cache:
1. Go to the Safari item on the menu bar
2. Select Empty Cache...
To clear the history:
1. Go to History item on the menu bar
2. Select Clear History
To clear everything (I havent tried this). Youll see this warning
Resetting Safari erases your browsing history, empties the cache, clears the Downloads window, and removes cookies. It also removes any saved names and passwords or other AutoFill text and clears Google search entries.
1. Go to the Safari item on the menu bar
2. Select Reset Safari...
I suspect there are other causes, though. I went through this drill a year ago, I'll have to dig out my notes. In essence, if you're getting the spinning beachball in Mail or Safari, there are a few steps you can take to remedy it.
From memory, two things.
The first helps in Mail by not opening HTML images in mail received unless you tell it to do so on a case by case basis.
1. Open the Mail application.
2. Go to the Mail menu item on the menu bar.
3. Select Preferences...
4. Select Viewing
5. Deselect the checkbox Display images and embedded objects in HTML messages. When you get mail with those images, there will just be a placeholder box and a button that gives you the option to see the images for that message. This won't affect the normal JPEGs someone sends you.
The second involves restricting your system languages to English. If at OS X installation all languages were specified to be supported, Safari can waste a lot of time going through the languages. You have to be logged in as an administrator to do this.
1. Select the hard drive icon on the desktop
2. Go to the File menu item on the menu bar (Finder has to be active)
3. Select Get Info
4. Somewhere in the Get Info window (Im not logged in as admin right now) there is a section where you can select language support. Deselect all languages except English.