How to disable “Top Sites” in Safari/Webkit completely

safarisnow leopard

First of all, I need to clarify: I do not mean turn off the viewing of top sites in the browser, or the switch for it. I've done that. However, even after the recent 5.0.3 update, Safari constantly pulls webpage previews down and into my ~/Library/Caches/com.apple.Safari/Webpage\ Previews directory. I picked 686 MB out of there just this am, and had to remove write access to that directory to stop it.

Now, running

defaults read -app Safari

Returns:

{
    AutoOpenSafeDownloads = 0;
    BookmarkSourceSelectedIndex = 0;
    BookmarksCollectionsIncludeAddressBook = 0;
    BookmarksCollectionsIncludeRendezvous = 0;
    BookmarksFlowToListHeightRatio = "-1";
    BookmarksMenuIncludesBookmarksToolbar = 0;
    BookmarksMenuIncludesRendezvous = 0;
    BookmarksSidebarWidth = 194;
    BookmarksToolbarProxiesWereConvertedForSafari4 = 1;
    CachedBookmarksFileDateNanoseconds = 0;
    CachedBookmarksFileDateSeconds = 1289982977;
    CachedBookmarksFileSize = 1400;
    ConfirmClosingMultiplePages = 0;
    ConvertedNewWindowBehaviorForTopSites = 1;
    DidPromptToFetchRecentHistoryPreviews = 1;
    DownloadsClearingPolicy = 1;
    DownloadsPath = "~/Downloads";
    DownloadsPathWasConverted = 1;
    "ExtensionSettings-com.hoyois.safari.clicktoflash-GY5KR7239Q" =     {
        H264autoload = false;
        H264behavior = "\\"none\\"";
    };
    HasPendingDefaultSearchProvider = 0;
    IncludeDevelopMenu = 1;
    InputFieldWidthRatio = 2;
    LastDisplayedWelcomePageVersionString = "4.0";
    NSNavLastRootDirectory = "~/Documents";
    NSPreferencesContentSize = "{668, 282}";
    NSPreferencesSelectedIndex = 4;
    "NSTableView Columns Activity Viewer Outline" =     (
        <040b7374 7265616d 74797065 6481e803 84014084 8484084e 53537472 696e6701 8484084e 534f626a 65637400 8584012b 07616464 72657373 86>,
        317,
        <040b7374 7265616d 74797065 6481e803 84014084 8484084e 53537472 696e6701 8484084e 534f626a 65637400 8584012b 06737461 74757386>,
        75,
        <040b7374 7265616d 74797065 6481e803 84014084 8484084e 53537472 696e6701 8484084e 534f626a 65637400 8584012b 0473746f 7086>,
        18
    );
    "NSTableView Hidden Columns Activity Viewer Outline" =     (
    );
    "NSTableView Sort Ordering Activity Viewer Outline" =     (
    );
    "NSToolbar Configuration BrowserWindowToolbarIdentifier" =     {
        "TB Display Mode" = 2;
        "TB Icon Size Mode" = 1;
        "TB Is Shown" = 1;
        "TB Item Identifiers" =         (
            BackForwardToolbarIdentifier,
            InputFieldsToolbarIdentifier
        );
        "TB Size Mode" = 1;
        "TB Visibility Priority Values" =         {
            BackForwardToolbarIdentifier =             (
                999
            );
            InputFieldsToolbarIdentifier =             (
                1000
            );
        };
    };
    "NSToolbar Configuration NSPreferences" =     {
        "TB Display Mode" = 1;
        "TB Icon Size Mode" = 1;
        "TB Is Shown" = 0;
        "TB Item Identifiers" =         (
            General,
            Appearance,
            Bookmarks,
            Tabs,
            RSS,
            AutoFill,
            Security,
            Extensions,
            Advanced
        );
        "TB Size Mode" = 1;
        "TB Visibility Priority Values" =         {
        };
    };
    NSUserKeyEquivalents =     {
        "Select Next Tab" = "@~\\U2192";
        "Select Previous Tab" = "@~\\U2190";
    };
    "NSWindow Frame BrowserWindowFrame" = "20 43 1024 716 0 0 1280 778 ";
    "NSWindow Frame Downloads" = "44 224 350 327 0 0 1280 778 ";
    "NSWindow Frame NewBookmarksSheet" = "540 502 242 204 0 0 1280 778 ";
    "NSWindow Frame Preferences" = "42 100 593 390 0 0 1280 778 ";
    "NSWindow Frame WBCookies" = "328 218 625 407 0 0 1280 778 ";
    "NSWindow Frame WBDatabases" = "428 288 424 337 0 0 1280 778 ";
    NewBookmarksLocationUUID = "E5A9993E-07EA-4AFA-841F-70455377066D";
    NewTabBehavior = 1;
    OpenWindows =     (
        BrowserWindowController
    );
    ProxiesInBookmarksBar =     (
    );
    RSSBookmarksInBarAreSubscribed = 0;
    RSSBookmarksInMenuAreSubscribed = 0;
    RecentSearchStrings =     (
        "chromium nightly download",
        "webkit based browsers",
        "webkit.org",
        "Top sites safari"
    );
    RegisteredSafariSyncClient = 1;
    RegisteredSafariSyncClientInSafari31Location = 1;
    RemoteConfigurationLastUpdateFailed = 0;
    RemoteConfigurationLastUpdateTime = "311383403.200184";
    ShowStatusBar = 1;
    SuccessfulLaunchTimestamp = "3.119792e+08";
    TabCreationPolicy = 2;
    TopSitesGridArrangement = 2;
    WKNERunState = 2;
    WarnAboutFraudulentWebsites = 0;
    "WebKit Web Inspector Setting - lastActivePanel" = elements;
    WebKitDeveloperExtrasEnabledPreferenceKey = 1;
    WebKitRespectStandardStyleKeyEquivalents = 1;
    WebKitTabToLinksPreferenceKey = 1;
}

Remember, I removed write access to the directory, in order to be able to paste:

1

0-11-20 12:53:02 PM [0x0-0x39039].com.apple.Safari[483] ImageIO: could not open '/Users/kb/Library/Caches/com.apple.Safari/Webpage Previews/.9F81E709EBF2C27F0422C0C85AE027AC.png-gNmU'

Which are now filling my logfiles.

Now, I disabled access to the web via Little Snitch before with this program, and quite noticeably the constant chatter from my laptop died right down.

How can I turn off Top sites in safari, ie, stop it from downloading all these idiotic, unwanted, performance killing, space using previews?

Mac OS 10.6.5 , Safari 5.0.3, Same issue with WebKit.

EDIT: Just for completeness, I just reset Safari. Behold! All my history appears to be gone, and yet, this site instantly recognized and logged me in! Unacceptable.
This is the exact same behaviour that caused me to do the action I am about to repeat: Blocking all access from the web via the Snitch. How sad. Hopefully someone can help.

Best Answer

There was a way to disable TopSites, but I don’t know if it still works:

defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2

to prevent safari from creating the previews (and using a placeholder).

To undo the above, you need:

defaults delete com.apple.Safari DebugSnapshotsUpdatePolicy

Other than that, there is nothing else you can do.