Stop Safari Auto-Refreshing Web Pages in Mac OS X Lion

Sep 20, 2011 - 21 Comments

Stop Safari from Auto Reloading Web Pages in 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
  • defaults write com.apple.Safari IncludeInternalDebugMenu 1

  • 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

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.

.

Related articles:

Posted by: Paul Horowitz in Mac OS, Tips & Tricks, Troubleshooting

21 Comments

» Comments RSS Feed

  1. Juan says:

    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.

  2. Igor says:

    I tried this with Safari 6.0.2 and the browser is now behaving erratically. How can I undo this switch?

    Thanks!

  3. Greg Blakeney says:

    Noticed when I do this I lose the gestures on my mouse :(

  4. anon says:

    Will this work in OSX 10.6.8 ?

  5. Nathan says:

    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.

  6. Criss says:

    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.).

  7. Nicolas says:

    “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.

  8. James says:

    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.

  9. Fernando says:

    WARNING(2): This procedure made AdBlock extension stop working. Cannot access to AdBlock configuration page anymore.

  10. John Signorino says:

    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.

  11. Glen says:

    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.

  12. chris powell says:

    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?

  13. media_lush says:

    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?

    • Paul says:

      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

  14. […] (vĂ­a OSXDaily) han hecho un tutorial sobre como […]

  15. Olive74 says:

    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 ?

  16. media_lush says:

    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!!

  17. Louis says:

    Worst feature in Lion by far, why would they do this anyway???

  18. JC says:

    Excellent! Now… Any help for this on my iPad?

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site