Fix for Safari always loading previously opened pages

Discussion in 'Mac OS X Lion (10.7)' started by flakmunkey, May 21, 2011.

  1. macrumors newbie

    Joined:
    May 21, 2011
    #1
    This tip may have been posted already, if so i apologize but I havn't seen it here.

    One of the new "features" of Safari that has been driving me insane is the fact that it always re-opens to whatever pages were opened when it was last quit. I understand that lots of people may like this but I can't stand it and the fact that the feature does not have an "off" button drives me nuts. After scouring the Library folder to find out how to kill it, I finally found a solution, albeit a little "hacky".

    The issue comes not from safari itself but from a new lion feature called "saved application state." To prevent Safari from using this feature I did the following:

    1. Launch Safari and navigate to whatever site you wish to open every time it is launched (e.g. I like to use Top Sites)

    2. Quit Safari

    3. Navigate to ~/Library/Saved Application State

    4. Right click com.apple.Safari.savedState and select get info

    5. Change permissions to read-only

    Thats it, now whenever you launch Safari it will use the page you selected and whenever you quit, it will not be able to update the save state because the folder in now read-only.
     
  2. macrumors 6502

    antmarobel

    Joined:
    May 8, 2009
    Location:
    Brasília
    #2
    ...I did not work for me...:eek:
     
  3. thread starter macrumors newbie

    Joined:
    May 21, 2011
    #3
    Thats strange that its not working for you, I've tried on multiple computers. Your permissions should look like the attached image
     

    Attached Files:

  4. macrumors 6502

    Takuro

    Joined:
    Jun 15, 2009
    #4
    The only issue I see with this method is that if you ever perform a software update or run Disk Utility to fix permissions, the application state file is going to default to its proper permissions. There have been a few times that I tried setting things to "read-only" in OS X to prevent their modification, and the operating system quickly reverted them to the right permissions or deleted the file and recreated it with the proper permissions.

    The only real fix would be if Apple ever includes an option for state-saving on a per-application basis. I know it departs from their ideal to make every app state-saving like in iOS, but people don't always want their browser to automatically load the next day filled with the stuff they looked at last night before bed. :D
     
  5. macrumors 68000

    Maclver

    Joined:
    Nov 23, 2008
    Location:
    36°07′53″N 95°56′14″W
    #5
    or you could just hit "Command W" then "Command Q"
     
  6. macrumors 68040

    petvas

    Joined:
    Jul 20, 2006
    Location:
    Mannheim, Germany
    #6
    The simplest way to do it is by closing Safari using Option-Cmd-Q

    That works with all apps in Lion. The state of the app won't be saved at all by using that key combination.
     
  7. thread starter macrumors newbie

    Joined:
    May 21, 2011
    #7
    That is excellent news, thank you! Save state is really driving me nuts. I don't like it on the iPhone and I really don't like it on my mac. Thanks for the tip!
     
  8. macrumors 68030

    Joined:
    Feb 26, 2011
    Location:
    Cincinnati, OH
    #8
    It won't work now. It is a know bug in DP3 Apple acknowledged.
    Maclver has the best solution in my opinion.
     
  9. thread starter macrumors newbie

    Joined:
    May 21, 2011
    #9
    Ah, damn, I'll stick with my fix. Its working great for me and I use way to many tabs to close them all individually every time I quit safari.
     
  10. macrumors 68030

    Joined:
    Feb 26, 2011
    Location:
    Cincinnati, OH
    #10
    True. You have to use what works best for you until it gets fixed.
    They know it's a bug.
    https://devforums.apple.com/message/432407#432407
     
  11. macrumors 68000

    Joined:
    Mar 6, 2008
    #11
    I've always been using Command + W that way it doesn't resume your browsing state.. I don't think this is a bug, I'm pretty sure its part of the resume feature in OSX Lion..
     
  12. macrumors 68030

    Joined:
    Feb 26, 2011
    Location:
    Cincinnati, OH
    #12
    It's a bug that Option+command+q does save the state. Command+q is part of the resume "feature".
     

Share This Page