Subscribe to
Posts
Comments
NSLog(); Header Image

Safari’s Stupid History and ‘Restore’ Functionality

Safari's 3.0 beta's "restore" functionality typically works really well. Unfortunately, history and the "restore" functionality seem far too closely tied to each other to work really well.

If I open five tabs in one window, clear my history, quit Safari, re-launch, and immediately choose "Reopen All Windows From Last Session,1" nothing happens.

In ~/Library/Safari you'll find both a "LastSession.plist" as well as a "History.plist". Unfortunately, clearing your history also clears your "LastSession.plist."

That's just wrong. I'm not certain it's a bug (but I intend to file it as such), per se, but it is wrong.

Footnotes

  1. Since when is the word "From" capitalized in Mac OS X menus? In Safari, "to" and "of" aren't capitalized, yet "From" and "For" are.

11 Responses to "Safari’s Stupid History and ‘Restore’ Functionality"

  1. It seems to make sense to me. Where is Safari pulling its LastSession data from? Most likely from your history (i.e. you had this page, this page and this page open, so we'll restore those). If you clear your history, it has nothing to work off.

    Personally, I NEVER clear my history, or any of a lot of stuff that many people clear out frequently. I'd prefer to have the record than to need it.

  2. Since when is the word "From" capitalized in Mac OS X menus? In Safari, "to" and "of" aren't capitalized, yet "From" and "For" are.

    If you look at the HIG, or the Apple Publications Style Guide, you'll see this about capitalization:

    Title style means that you capitalize every word except:

    • Articles (a, an, the)
    • Coordinating conjunctions (and, or)
    • Prepositions of three or fewer letters, except when the preposition is part of a verb phrase, as in “Starting Up the Computer.”

    In title style, always capitalize the first and last word, even if it is an article, a conjunction, or a preposition of three or fewer letters.

    "From" doesn't fit in any of those categories, so it should be capitalized in Menu items. "For" on the other hand is a "preposition of three or fewer letters", so, unless it's the first or last word of a menu item's name, it's probably a bug.

  3. Arden said on September 14, 2007:

    It seems to make sense to me. Where is Safari pulling its LastSession data from?

    As I said, it pulls it from LastSession.plist. When you close a window or a tab, that file is immediately written to independent of the History.plist file.

    All I'm asking is that the LastSession.plist - which is already maintained independently - not be wiped out when your history is wiped. Doing so creates a state where the user has several URLs open across one or more windows (their "session" still contains web pages), yet

    Arden said on September 14, 2007:

    Personally, I NEVER clear my history, or any of a lot of stuff that many people clear out frequently.

    Some people clear their history for performance reasons. After all, leaving the setting on "after one month" (or, for heavy browsers, "after one week" or shorter!) can slow up typing in the URL field.

    But this exposes another flaw. If you set Safari's pruning to remove history items after only one day, the LastSession.plist file is also affected. If I open a page at 7:00am on Monday and Safari crashes at 9:00am on Tuesday with that page still open, it won't be restored when I "reopen" my last session.

  4. Erik J. Barzeski said on September 15, 2007:

    As I said, it pulls it from LastSession.plist. When you close a window or a tab, that file is immediately written to independent of the History.plist file.

    And I'm suggesting that maybe the two aren't as independent as you think. Safari may be writing, to LastSession.plist, which pages in History.plist were open when you closed out your last session. I'm not saying this is the right behavior, but it's at least plausible, no?

    Safari 3 is still beta, so there's still time for all of us to submit bug reports and have it fixed before it's released.

  5. Arden said on September 15, 2007:

    And I'm suggesting that maybe the two aren't as independent as you think.

    And I'm suggesting that's the freakin' problem! 😕 I've been fairly clear in showing they're not independent. That's why I wrote that clearing one clears the other. It shouldn't (IMO), but it does.

  6. The behaviour makes sense to me. What is in LastSession.plist is part of your browser's history. The point of clearing history is so that no one can see what you have browsed; if someone could simply restore your last session, that kind of defeats the point of clearing history.

  7. Daniel said on September 17, 2007:

    The point of clearing history is so that no one can see what you have browsed

    That's not the point of clearing history. The point of clearing history is to, you know, clear history: free up the auto-complete URLs, speed up the browser, etc.

    If you want to make sure nobody can see what you've browsed, there's another feature for that: Private Browsing.

    History has its own file. LastSession has its own file. If they're truly supposed to do one thing, why not just include a "LastSession" array in the History.plist file? This decision doesn't even work at the filesystem level where Apple has seen fit to split the two functions across two files.

  8. If you set Safari's pruning to remove history items after only one day, the LastSession.plist file is also affected. If I open a page at 7:00am on Monday and Safari crashes at 9:00am on Tuesday with that page still open, it won't be restored when I "reopen" my last session.

    Ouch. Automatically clearing the last session makes the brain-dead behavior of deleting it when the regular history is manually deleted even worse.

    I sure hope the official Safari 3 release will have some way to manage the last session and history independently.

  9. Um, what's the point of clearing your history if it's still stored somewhere?

  10. Joe Boxer said on September 24, 2007:

    Um, what's the point of clearing your history if it's still stored somewhere?

    Joe, because the history is not your session. History is where you have been while session is what you were last doing. If you want to clear what you've last been doing (clearing your session), then you should close those windows before quitting.

  11. is there a way to unclear / undelete the web history on safari? i accidentally hit clear history and it just did it instead of confirming. thanks!


Trackback URI | Comments RSS

Leave a Reply

Please abide by the comment policy. Valid HTML includes: <blockquote><p>, <em>, <strong>, <ul>, <ol>, and <a href>. Please use the "Quote Me" functionality to quote comments.