PDA

View Full Version : Fix for Safari always loading previously opened pages




flakmunkey
May 21, 2011, 08:21 AM
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.



antmarobel
May 21, 2011, 10:33 AM
...I did not work for me...:o

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

Takuro
May 21, 2011, 11:32 AM
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

Maclver
May 21, 2011, 11:46 AM
or you could just hit "Command W" then "Command Q"

petvas
May 21, 2011, 11:52 AM
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.

flakmunkey
May 21, 2011, 12:00 PM
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.

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!

mrapplegate
May 21, 2011, 12:04 PM
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.

It won't work now. It is a know bug in DP3 Apple acknowledged.
Maclver has the best solution in my opinion.

flakmunkey
May 21, 2011, 12:07 PM
It won't work now. It is a know bug in DP3 Apple acknowledged.
Maclver has the best solution in my opinion.

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.

mrapplegate
May 21, 2011, 01:20 PM
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.

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

Yamcha
May 21, 2011, 03:57 PM
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..

mrapplegate
May 21, 2011, 04:04 PM
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..

It's a bug that Option+command+q does save the state. Command+q is part of the resume "feature".