Stop Safari Auto-Refreshing Web Pages in Mac OS X Lion
A new addition to Safari 5.1 in Mac OS X 10.7 is that web pages auto-refresh if they are left inactive for a period of time. The feature can seem unnecessary and even annoying, but there’s no clear preference option to disable reloading of pages. Thankfully, Stormcloud (via DaringFireball) shows us how to stop this pesky behavior in Safari 5.1. Here’s the play-by-play to disable it:
- Quit Safari, then launch the Terminal (located in /Applications/Utilities/) and enter the following command
- Relaunch Safari and you’ll see a “Debug” menu appear on the far right, alongside “Help” (yes, this is different from the Develop menu)
- Pull down the new Debug menu and scroll down a ways until you see “Use Multi-process Windows” and select it so that it’s unchecked
- Open a new Safari window and if you see an [SP] next to the web pages title, you’re now in single process mode, which prevents the automatic refreshing of webpages
defaults write com.apple.Safari IncludeInternalDebugMenu 1
If you’re wondering why changing some setting called “multi-process windows” effects automatic reloading of web pages, Stormcloud provides a good description of what this feature is and how it works:
So what is a âmulti-process windowâ anyway?
One of the new features in Safari 5.1 is a major new version of the underlying engine â WebKit2. Under WebKit2âs new process architecture, Safari consists of two separate processes â the âUI processâ (the Safari application itself, including the address bar, toolbar, bookmarks bar, menus, etc.), and the âweb processâ (an independent process that loads and displays actual web pages).
Apart from other goals, the purpose of this is to provide some measure of crash protection. While it does prevent the entire Safari application from crashing (at least as far as Iâve seen), it doesnât protect you from losing anything youâve typed into text fields in web pages. All web content is handled by a single web process, so if any page malfunctions and causes the web process to crash, all open tabs will be reloaded, and anything you had typed into any of those pages will be lost. Furthermore, any downloads that were in progress will also be halted; you might be able to resume some downloads, but many will have to be started over. This can be very frustrating when downloading large files.For that reason, the benefits of the new multi-process architecture are somewhat dubious, at least until Apple manages to address the issue of spontaneously reloading tabs (assuming itâs even possible to prevent this behavior without redesigning the overall architecture of WebKit again).
Basically, it’s a well intentioned feature, but it’s also causing some user headaches. In some cases it causes Safari to take up far more memory than it should, and it can even cause app slow downs. Presumably all of this will be fixed in a software update though.
The big caveat about running Safari 5.1 in single-process mode: many plugins and extensions don’t work, most notably (and annoyingly) ad blockers, ClickToFlash, and 1password. You’ll have to decide if that trade-off is worth it, or you can always just use Chrome or Firefox too.
If you want to avoid loosing pages you loaded to your iPhone or iPad, because it reloads by itself when you don’t have internet connexion, you can use Noosfeer for that. No need to download another browser or an app.
I tried this with Safari 6.0.2 and the browser is now behaving erratically. How can I undo this switch?
Thanks!
Noticed when I do this I lose the gestures on my mouse :(
Will this work in OSX 10.6.8 ?
Well Apple has basically pushed me to switch. I’m surprised more people aren’t complaining about this. It seems like Safari refreshes constantly. Every time you go back, every tab after a few minutes of inactivity. Driving me nuts, and no I don’t want to disable all my plugins to fix it.
Wow — I had Chrome AND Safari open, and I leave tons of windows open with multiple tabs — my machine has basically become unusable.
Due to this, I added AdBlocker, click-to-flash, etc. to minimize the bandwidth used by such….
I’d almost prefer the ads & flash issues. I switched to safari-only again, but the force-reload all open tabs thing happens several times a day. Maybe I can run both safari & chrome again if I turn this feature off… But chrome already seems to do much of the same thing, and reload all open tabs. That’s exactly the thing I DON’T want. Just cache the page as long as I have the tab open….if it has any javascript/ajax, it will refresh itself (such as gmail, facebook, etc.).
âA new addition to Safari 5.1 in Mac OS X 10.7 is that web pages auto-refresh if they are left inactive for a period of time.â
A source for this â dubious â affirmation ?
Thanks.
What a nightmare.
Try and reduce the impact of the occasional crash, and thereby make the whole application nightmarishly slow and unwieldy.
Now I understand the process that’s appeared since the Safari update, and the drastic reduction in performance after some time.
‘Sack ’em, I say. Jeez.
WARNING(2): This procedure made AdBlock extension stop working. Cannot access to AdBlock configuration page anymore.
I’d better read till the end of the article !!!
WARNING: This fix may have unintended consequences.
I use Roboform as a password vault and form-filler. It adds a toolbar to Safari and makes form-filling quick and simple. Well, my Roboform toolbar quit working about a week ago. I’ve been working with Roboform Tech Support for several days but nothing helped. Then I remembered turning off Mulit-process Window support in Safari. I turned it back on and now my Roboform toolbar works again.
If you have a Safari extension that’s not working since you turn-off Mulit-process Window support, this may help you.
Thanks for the solution. This problem is very annoying on slow, intermittent connections and has made Safari unusable.
I don’t want to lose ad blocking 1Password etc so I will have to stop using Safari. Very disappointing from Apple.
Hi Paul, I followed your instructions and it seemed to work ok but for some reason the font size changed on several International sites I view on a daily basis (mainly news sites such as BBC, UK Independent newspaper, Sky News and so on). How did this happen do you suppose and can I fix it?
well…. Safari crashed 5 times in a row…. did restart and it now opens without click to flash [which I never used anyway]
“The big caveat about running Safari 5.1 in single-process mode: many plugins and extensions donât work, most notably (and annoyingly) ad blockers, ClickToFlash, and 1password”….. I have disabled ad blocker but Glims installed which I regard as essential…. if it keeps crashing could you tell me what I need to do to reverse the process?
Just go back to the “Debug” menu and re-check the Multiple Process Windows option, as long as it’s checked Safari will behave as the default does in 5.1
[…] (vĂa OSXDaily)Â han hecho un tutorial sobre como […]
Thanx for the tip ! I suppose to disappear debug menu, I have to change 1 to 0 at the end of command..?
Am I right ?
Yes, replacing the 1 with a 0 and then relaunching Safari will hide the “Debug” menu.
I was just about to complain on the forums about the continual white flash whenever I go back to one of my tab…. now I know why and how to get rid of it, thanks!!
Worst feature in Lion by far, why would they do this anyway???
Excellent! Now… Any help for this on my iPad?