Pages

Become a Safari power user

I spend a lot of time in Safari which is my browser of choice. I would like to share the resources I've come across to improve the Safari browsing experience. Even though I've talked about a couple of these in bits and pieces before I wanted to create a single comprehensive post that covers Safari across the board; tips, helpful sites and some usage techniques.

Setting up Safari
Before we begin there are some settings that you should check. Open the preferences (Command-,) within Safari. In the General section I have my browser set to open links from applications in a new tab in the current window. Though I do occasionally use multiple Safari windows it's pretty rare - I much prefer to keep it all in one window and leverage the tabs. Under the Tabs section I also have Command-Click open a link in a new tab and do not select tabs and windows as they are created.

Even with these options set, some web applications—Gmail in particular—manage to open links in a new window. Apple added a terminal command into Safari 3.1 that addresses that issue. Open a terminal session and enter the following command:
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
Once that's done you must close down Safari and restart it in order for this to take effect.

Another thing I always turn on is the Status Bar (Command-/). When I hover over most links it will show me where the link leads and I get an idea of what's going on as pages load up their contents.

If you are a technical user or developer you may want to turn on the Develop menu, located under the Advanced section. This will add a Develop pull down menu between Bookmarks and Window in the menu bar. It gives you some access to a couple of cool features I discuss below.

Finally, I have have my middle mouse button set to open a link in a new tab in the current window, similar to Command-click. This is usually controlled by your Keyboard and Mouse settings under the system Preferences. Since I use a Logitech mouse and USB Overdrive I change the setting from that screen.

Making the most of tabs
I love tabs in browsers. It is far and away the best thing that's been added to the browsing experience since web browsers were initially introduced. I rarely have multiple browser windows open, preferring instead to use as many tabs as I can. If I conduct a search or am on a link rich web page I will often just use the middle mouse button—or Command-Click—and open every link that looks interesting. They populate in the background while I continue reading what's in front of me. Only after I'm done with the page I'm reading will I start to explore the subsequent tabs that were created.

As with many people in the internet age I have developed a mild form of attention deficit disorder, popping from topic to topic without focusing on content. This model of using tabs has helped me become a bit more focused.

Key Keyboard Shortcuts
Lately I've been trying to use the keyboard more in Safari, especially when I have the MacBook balanced on my lap. Safari supports a number of handy shortcuts, though the ones that I've found valuable are the following:

KeystrokeAction
Command-LJump to the address bar
Command-TCreate a new, blank tab
Command-Option-FJump to the Google search box
Command-FOpen the find utility for the current web page
Command-Shift-[Previous tab
Command-Shift-]Next tab
Command-WClose current tab
Command-Up ArrowTop of page
Command-Down ArrowBottom of page
Option-Up ArrowScroll up one screen
Option-Down ArrowScroll down one screen
Control-Command-DLoad the live dictionary on any word under the mouse*
*Yes, I know it's not a Safari thing; works in any Cocoa application as well. I just use it most often in Safari.

There are other shortcuts listed in Help but these are the ones I've found the most helpful.

Bookmark Management
I use the Bookmark bar, which is just above the tab line, for my most common destinations. I always rename items after I've dragged them there to keep it as short and sweet as possible. I also create pull down folders on the Bookmark bar for each of the key areas I focus on: Technical resources, Mac Stuff, Family, Work and Development. In many cases I'll add sub folders under these as well.

For some reason I have not found much value in the Bookmarks menu bar. I think this is a function of having multiple monitors and sometimes my Safari window is on my second monitor while my menu bar is permanently fixed to my primary monitor. This way my browser list is always close at hand.

Using the Develop Resources
If you turned on the Develop menu in the menu bar there are a couple of interesting things you can do. I mentioned before that you can fake some web sites into thinking you are running a different browser. But if you are a web developer or interested in what's really happening behind the scenes of a web page you can access some powerful inspectors through the Develop menu.

Loading up the Web Inspector will give you a highly structured view of the underlying HTML that makes the web site work. Here is an example of what my main page looks like:
In addition you can load a Network Timeline that displays all of the elements on the current page and how long they took to load:
If you are building a web site or helping someone troubleshoot a problem area the Network Timeline is a great resource for figuring out where the bottlenecks are.

Add-in Resources
There are really only two add-in resources for Safari that I've found really helpful. By far the most helpful is 1Password. You can read my original blog post about it but I will say again it's a fantastic utility and I highly recommend it.

In addition I also use Inquisitor, which adds some enhanced searching functionality, essentially making the Google search box perform much like the in-site searching features on Apple.com. I also have more on Inquisitor in a recent blog post.

There is also a collection point on the web for Safari plugins called PimpMySafari.com. Inside of that site you will find a number of add-ons for Safari with nice little summaries and feature lists.

Wrapping it up
While I covered all of the things I've learned about making the most out of Safari over the last four months I'm sure I missed something. If you have a specific tip that you think would help folks please add it in the comments below. I mentioned at the beginning that this would be a comprehensive list and I'm pretty confident that if I missed anything one of the many people that have been helping me will chime in and fill in the blanks.

19 comments:

Dustin said...

Hey any way that you can change the default page that opens with you start a new tab from a blank page to lets say google? If that could be changed I would switch from Firefox to Safari.

Pecos Bill said...

As pimpmysafari will show, there are ad blocking tools you can add. I've found SafariBlock works rather well and the latest version now accepts feeds (alas, you cannot allow Google Ads that are text based -- which are the ads I like to see; animated ads are evil to my sensitive vision). Safari AdBlock, quite a bit younger at 0.3.2, sounds interesting as I use Adblock on Firefox at work on my peecee though this one doesn't sound configurable). PithHelmet is another, older option. It seems to be lacking quality due to the higher number of rev's. I've only tried SafariBlock

carl said...

Great story, now if you can only tell me how to fix the problem downloading .xls, .doc and .ppt files in safari (but not in firefox ...).

N45800 said...

I don't know about changing the default tabs, but if you just use Command-T, Command-Shift-H, or even just Command-T, Tab (Tab into google search bar), that will open google.com. I prefer it to open a blank page, since if I manually open a new page, there is usually a specific site I want to go to.

Two more tricks.
1) Command + 1 = First bookmark in bookmark bar (excluding folders), Command + 2 = 2nd, etc.
2) If you want a bit more complex "Develop" menu, those features used to be in a Debug menu, which had quite a few other things you could do. To enable it, type
defaults write com.apple.Safari IncludeDebugMenu 1
in Terminal and relaunch Safari.

And what problem downloading files?
If the problem is that .doc, .xls, and .ppt files appear as text instead of downloading, it's because Safari listens to the MIME type before it listens to the file extension. If the website sends the file with a MIME type of text/plain rather than application/xls, application/excel, etc., Safari will render it as text. This isn't a problem with Safari, this is a problem with the website, which tells Safari that it is a text file, rather than an application document.

N45800 said...

Also, if you have that problem with files displaying rather than downloading, you can option-click on a link to download it (if it's a website, it will DL the HTML, it if is a jpeg, it will DL the JPEG, etc.). Or, if it is already loaded, just go to File -> Save and save it as a .xls or .ppt or whatever.

In any case, if you try downloading from another website that has .ppt or .xls files, that has the MIME type properly setup, it should properly download the files.

Anonymous said...

To create a new tab you can double-click in the space to the right of the last tab. ~ Alancito.

David Alison said...

@All: Thanks folks - some really helpful tips in there!

Anonymous said...

Hey David,

If you enjoy playing around with browsers, you might want to check out Shiira at:

http://shiira.jp/en.php

Like Safari, it's based on WebKit and has some cool effects of its own. There's also a neat widget version.

I doubt you'd want to make it your primary browser, but it's worth a look just to see what's out there.

Scott

phild said...

The quickest way back a page on my 12" Powerbook is to use the delete key (adding shift reverses direction). The Command key will do this in a new Tab. Using the arrow keys seems easier for moving across the tabs (using Cmd.-Shift) rather than the [ ] keys, especially when the arrows are already in use with NetNewsWire. Tabs can be dragged and reordered using the Cmd. key. The menu item Window/Move Tab to New Window is handy when a page is going to generate a rash of new tabs, but an easier method is to just drag it downwards, and dragging a page's favicon to the bookmark bar allows you to place it where you want it.

Scott said...

Hi David. I've been enjoying your intelligent take on being a switcher.

Here are a couple more keyboard shortcuts I use and did not see mentioned.
Page Down --> Space Bar
Page Up ----> Space Bar + Shift
Control Click a word and you get a small pop-up menu. Scroll (?) down to 'Look Up in Dictionary' and release. A small window will appear bearing the definition along with some options for further information.

Keep up the good work.

Scott

Switch Stories said...

More resons to love Safari. I really like it. It is so simple and quick to use and your web inspector examples only make me look deeper into Safari's great potential.

Anonymous said...

Dave, have you used Camino at all? It's by Mozilla and the FireFox equivalent for Mac. It is my browser of choice after playing around with it and Safari for awhile.

David Alison said...

@Anon: I haven't tried Camino yet but have read a little about it. I usually swap between Safari and Firefox right now; Safari for my normal web browsing because of it's speed and Firefox for my development work because it has a native XML reader that makes like simple and the Javascript error management is pretty good.

ping said...

I personally use another alternative browser most of the time: iCab

It also uses WebKit and thus "inherits" its features (such as resizable input fields) and its speed. But as nice as Safari is, it offers next to no opportunities for customization.

That is where iCab really excels. Among (many!) other things, it brings with it a user-configurable Filter Manager which lets you fine-tune its considerable range of settings to each individual site (or a range of sites) if you want.

My personal setup, for instance, blocks JavaScript on all but a few selected sites. Only when I'm not bothered to add another entry in the exceptions list and I'm reasonably certain that a site which absolutely requires JavaScript (bad!) is legitimate I still use Safari (this site, incidentally, is one of those).

But for my general browsing needs iCab is far more convenient and far more practical for me.

David Alison said...

@Ping: Checking out iCab now - looks pretty cool.

On the Javascript issue, that's a tough one. If a site is relatively static then it's reasonable to assume that it should not require Javascript. While this blog is about as static as it gets I don't really manage it. I use Blogger standard stuff and have Digg, Feedburner and Google Analytics add-ins. If this blog was an actual job, not a cathartic exercise on my part, I would probably use something else but for convenience Javascript widgets are tough to beat.

I'm curious why you are so concerned with Javascript. I've read all your comments on this blog and you clearly know what you are doing—is there something specific that makes Javascript bad for you? An extraordinary amount of work goes into leveraging Javascript to create responsive web UIs and for many developers creating a site that gracefully degrades is too much work.

ping said...

I'm not really seriously concerned about JavaScript in general, but I don't like random sites to mess with my user experience (popups, inline advertising etc.).

Many if not most remaining browser vulnerabilities are also based on JavaScript, so suppressing it for normal browsing just adds another security perimeter — yes, you can tell I'm a bit paranoid! 8-)

As always, it's a compromise between convenience for me, convenience for the web designer and security. And everybody will have different priorities in this matter.

By the way, this site works just fine without JavaScript as well (as it should), but the posting mechanism requires it (which is not ideal but reasonable in my view).

I appreciate the advantages of JavaScript (which is why I use it myself for certain projects), but one of the reasons why I prefer iCab is that it lets me decide where to allow it on a few sites and suppress it everywhere else.

Yes, I'm a paranoid control freak in these matters, but with the right tools it's still convenient for me and avoids quite a bit of aggravation. :-)

SlimJim said...

David, thanks for the tip on getting Gmail to open a link in a new tab. I use the Gmail server to read my emails when I'm traveling and this would be a nice feature to have. If I put that command in Terminal, how can I go back later and delete it if I should want to? I tend to stay away from terminal, as I'm afraid I'll mess something up. Thanks for any thoughts on this.

I do use Terminal for maintenance as I turn my two Macs off in the evening, thus the built-in maintenance routines never get run otherwise. Open terminal, type in "sudo periodic daily weekly monthly" (w/o quotes), press return, enter admin password and press return (nothing seems to happen, but look at the CPU activity going on). When processes have finished and terminal prompt is displayed, type "exit" (w/o quotes) and press return to logout of Terminal. I do this routine about once each month.

Thanks for your blog, and all the helpful tips you and other readers list in it. A great read, and I've learned a lot about the Mac from reading it...SlimJim

David Alison said...

@SlimJim: Usually with simple commands like this one you are simply changing a setting from true to false so changing it back involves running the same command but substituting the word true for false.

I just put up a post this morning about the impact of putting your Mac into sleep mode rather than powering it down. I've noticed that when my Macs wake from sleep they execute the automated maintenance scripts that normally would have run had they not been in sleep mode.

Glad you are getting value from the blog!

Ian Han said...

Hi, David
You might love this; you can use multi-touch pad of Mac Book Pro.
http://osx.iusethis.com/app/multiclutch

I setup Rotate as Back/Forward, Swipe up as New Tab, Swipe down as Hide, Swipe right/left as tab movement.

Shortcut is great, but less than touch!