OSX Spotlight – Filter “Safari history item” and mailboxes

Most folks browse the web and some do so often. This creates a history which Safari conveniently stores for future reference. The feature is especially useful when you go to “History -> Show All History”.

What isn’t so useful is searching for a file and receiving thousands of results for “Safari history item”. This shouldn’t be an issue because there is an option to remove “Safari” from Search Results, however, this option fails to remove Safari history items from Spotlight search results.

To disable Spotlight from searching “Safari history item”:

  • Open System Preferences, go to Spotlight and click on Privacy pane
  • open a new Finder window
  • browse to <home> /Library/Caches/Metadata/Safari
  • Drag and drop “History” folder from Finder to Privacy pane
  • Filtering Specific Mailboxes: browse to Library/Mail/
  • Find offending .imapbox, .mbox, or any other; drag and drop onto Privacy pane

As far as I can tell you can filter many of the Spotlight searches by adding any of the folders in Library/Caches/Metadata. Here is what my Privacy settings look like:

 

Spotlight Privacy Filter
Spotlight Privacy Filter

Hopefully you made it here and didn’t see this:

failed search

Advertisements
OSX Spotlight – Filter “Safari history item” and mailboxes

Safari Crash / Bug Webkit # 16196

I’ve been seeing this type of crash fairly often in Safari now. Not necessarily the same situation every time, but the culprit is almost always Javascript – not bad javascript – Safari just doesn’t like it. 

Here’s a stack trace:
0   com.apple.WebCore             	0x9535ff20 WebCore::ApplyStyleCommand::splitTextElementAtStartIfNeeded(WebCore::Position const&, WebCore::Position const&) + 32
1   com.apple.WebCore             	0x9535f02c WebCore::ApplyStyleCommand::applyInlineStyle(WebCore::CSSMutableStyleDeclaration*) + 396
2   com.apple.WebCore             	0x9535bcac WebCore::ApplyStyleCommand::doApply() + 284
3   com.apple.WebCore             	0x952e5eb8 WebCore::EditCommand::apply() + 168
4   com.apple.WebCore             	0x952e66cc WebCore::CompositeEditCommand::applyCommandToComposite(WTF::PassRefPtr) + 44
5   com.apple.WebCore             	0x9535baf8 WebCore::CompositeEditCommand::applyStyle(WebCore::CSSStyleDeclaration*, WebCore::Position const&, WebCore::Position const&, WebCore::EditAction) + 120
6   com.apple.WebCore             	0x9535b5fc WebCore::ReplaceSelectionCommand::completeHTMLReplacement(WebCore::Position const&) + 700
7   com.apple.WebCore             	0x95358240 WebCore::ReplaceSelectionCommand::doApply() + 11600
8   com.apple.WebCore             	0x952e5eb8 WebCore::EditCommand::apply() + 168
9   com.apple.WebCore             	0x953f0d0c -[WebCoreFrameBridge replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:] + 236
10  com.apple.WebKit              	0x94b1a82c -[WebHTMLView(WebHTMLViewFileInternal) _pasteWithPasteboard:allowPlainText:] + 220
11  com.apple.AppKit              	0x918b9358 -[NSApplication sendAction:to:from:] + 104
12  com.apple.Safari              	0x00037870 0x1000 + 223344
13  com.apple.AppKit              	0x91954990 -[NSMenu performActionForItemAtIndex:] + 408
14  com.apple.AppKit              	0x919546c0 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 228
15  com.apple.AppKit              	0x91954388 -[NSMenu performKeyEquivalent:] + 744
16  com.apple.AppKit              	0x91952e6c -[NSApplication _handleKeyEquivalent:] + 456
17  com.apple.AppKit              	0x91889a94 -[NSApplication sendEvent:] + 3548
18  com.apple.Safari              	0x00032fb0 0x1000 + 204720
19  com.apple.AppKit              	0x917f6ed4 -[NSApplication run] + 776
20  com.apple.AppKit              	0x917c792c NSApplicationMain + 440
21  com.apple.Safari              	0x00002d10 0x1000 + 7440
22  ???                           	0x00000ffc 0 + 4092

For anyone blogging and trying to paste content into the blogger Compose post window, good luck in Safari!

Looks like WebKit folks are working on it, there’s an Apple bug filed as well. This bug leads to crashes. If it’s happening for you, know that you are not alone or crazy. Writing browsers ain’t easy!
I heart WebKit team.
Safari Crash / Bug Webkit # 16196