5

Safari puts background (i.e., currently not selected) tabs to sleep. If that tab is on a website that requires an active connection to its server, such as chat apps (Slack, Google Talk, etc.), then that app will disconnect from the server. Most of them will show you a brief "reconnecting" or "retrying" message when you select that tab again.

Not only this is annoying but it also causes that tab to not update or refresh constantly so I would miss a notification, if there is one, or even lose the session from the server requiring me to type my user credentials again. That happens very often with my company's e-mail web app.

This is not what the App Nap technology does. I've already tried disabling that with

defaults write NSGlobalDomain NSAppSleepDisabled -bool YES  

to no avail.

It isn't the "Stop plug-ins to save power" preference either, as that is disabled and those websites don't use plug-ins.

Does anyone have any tips?

Safari 10.1
macOS Sierra 10.12.4

7

I think the setting you’re looking for is Disable Hidden Page Timer Throttling, located under DebugMiscellaneous Flags.

If you haven’t enabled the Safari Debug menu yet, triple-click the following line and paste it into a Terminal session:
defaults write com.apple.Safari IncludeInternalDebugMenu 1

Now completely quit Safari, then reopen it. The Debug menu should become available.

If you’re on Safari Technology Preview, the Terminal command is:
defaults write com.apple.SafariTechnologyPreview IncludeInternalDebugMenu 1

  • 2
    Nice! I believe that really does it. Thank you so much. I wasn't able to try on all websites I use yet, but those I commonly use they seem to remain connected all the time now. I did some research and I believe you can also enable this option directly on the command line using: defaults write com.apple.safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2HiddenPageDOMTimerThrottlingEnabled -bool YES However, I think it is safer going your route. Who knows Apple decides to change this variable in the future. – AndreG Apr 29 '17 at 17:53
  • 2
    Just adding that it does indeed work for all websites. Life saver. Thank you Phong. – AndreG May 3 '17 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .