N*******3 发帖数: 2589 | 1 Lion中的safari和以前相比有一个奇怪的现象:如果开了很多tab的话,切换的时候会
发现他们白掉了,要重新刷新才行。这对喜欢开很多个tab的童鞋很不方便,因为不能
快速切换,每次要重新加载。
其实原因是Lion中的Safari增加了一个feature:Multi-Process windows. (详细情况
有时间的话可以读下面的文章全文)
关闭这个功能的方法:
1.Quit Safari, then launch the Terminal (located in /Applications/Utilities/
) and enter the following command:
defaults write com.apple.Safari IncludeInternalDebugMenu 1
2. Relaunch Safari and you’ll see a “Debug” menu appear on the far right,
alongside “Help” (yes, this is different from the Develop menu)
3. 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
这时开一个新窗口,会发现白tab不再出现了~
另外感觉整体速度也有所提升,因此推荐~~
P.S. 看来这个新feature有点失败的说~~ :(
------------------
全文:
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
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. |
|