Apple's Safari is a Mac OS X-only Web browser that has become the default Mac browser with Mac OS X version 10.3. Safari offers many great features and excellent performance (see Figure 13.1).
Because you are reading this book (indicating that you know your way around a Mac), I assume that you are quite comfortable with the basics of using Safari, such as using its buttons, navigating the Web by entering URLs in the Address bar, and so on. In this section, you will learn about some of Safari's great features that might not be quite so obvious.
Like other browsers, there are a number of ways in which you can configure Safari to match your browsing preferences.
By default, Safari's window is pretty standard looking (refer to Figure 13.1). However, using the options on the View menu, you can customize the Safari browser experience to suit your likes (see Figure 13.2). On that menu, you have the following options:
Address Bar? This command shows or hides the Safari Address bar. At its most basic, the Address bar displays the URL of the page currently being shown. You can also add more tools and buttons to the Address bar by using the eight view options listed underneath the Address Bar option on the menu. If you hide the Address bar, the other eight options are hidden as well. You show or hide the Address bar by pressing -| (which is actually Shift--\ on the keyboard).
Back/Forward? This option shows or hides the Back and Forward buttons.
Home? If you select this option, the Home button is displayed. You can configure your home page using the General preferences.
AutoFill? If you click the AutoFill button, a form is completed with information from your card in your Address Book (more on this feature later).
Text Size? These buttons enable you to increase or decrease the size of text being displayed on a page (if you have ever squinted while trying to read a page designed on Windows, you know why increasing the size of text on a page can be necessary!).
Stop/Reload? This button can be used to stop a page that is currently being loaded or to reload a page currently being displayed.
Add Bookmark? Use this option to show or hide the Add Bookmark button.
Google Search? The Google Search tool is a great way to search for information, as you will learn in a later section.
Bug? When you click this button, you can send a bug report about Safari to Apple.
Bookmarks Bar? The Bookmarks bar provides easy access to your favorite bookmarks. It appears under the Address bar if it is being displayed or at the top of the window if it is hidden.
Status Bar? The Status bar provides useful information about what Safari is doing at any point in time or information about a link to which you are pointing, such as its URL.
You might want to show most of these options until you have used Safari enough to know which you don't need or until you are comfortable using keyboard shortcuts and don't need to display the buttons or controls in the Address bar.
Press -, to open the Safari Preferences dialog box, and click the General button to open its General pane (see Figure 13.3). The general preferences are explained in the following list:
Default Web Browser? Use the Default Web Browser pop-up menu to choose your default Web browser, which is the browser Mac OS X will use to view Web pages and to open Web links. Intitally, Safari is the option selected on the pop-up menu. However, you can select Internet Explorer to choose that browser or choose Select and then pick another browser. This sets your browser preference for all areas of the OS, not just within Safari.
New Window Behavior? Use the "New windows open with" pop-up menu to choose what happens when you open a new Safari window. The options are Home Page, Empty Page, Same Page, or Bookmarks. In most cases, Empty Page is the best choice because it doesn't cause Safari to download a page that you probably don't want to view anyway. However, if you frequently use bookmarks to move to a new page, that can be a useful option as well.
Home Page? Type a URL in the Home page field to set it as your home page. Alternatively, you can move to the page you want to be your home page, open the General pane, and click Set to Current Page. The home page is displayed when you use the Home button or if you have it set to be displayed when you open a new Safari window. If you leave the field empty, moving to the home page opens a new empty page.
Download Behavior? You will frequently use Safari to download files. Use the "Save downloaded files to" pop-up menu to select a location in which you want those files to be placed by default. The choices are Desktop or Other. I recommend that you select Other, create a folder called Downloaded Files or something similar, and set that folder as your download location. That way, you will always know where files you download are located.
Setting a file download location, similar to choosing a default Web browser, affects the OS?not just Safari. For example, if you use a download tool that uses your download location preference, that application uses the preference you set within Safari.
Use the "Remove download list items" pop-up menu to choose when items are removed from the Downloads window (you'll learn about that later).
If you want "safe" files to be opened as soon as you download them, check the "Open 'safe' files after downloading" check box (it is checked by default). When Safari downloads image, movie, text, sound, and other content files, they are opened automatically. For those files that might cause damage to your system, such as applications, macros, and other suspicious files, you must open them manually after you download them.
Link behavior? When documents, such as email messages, contain URL links, the two radio buttons determine how those links open when you click them. If you click the "in a new window" radio button, a new Safari window opens and displays the page at which the link points. If you click "in the current window," the content at which the link points replaces that shown in the current window.
Click the Appearance button in the Safari Preferences dialog box to move to the Appearance tab. Here you can set the standard font, fixed-width font, and default encoding that is used when pages are displayed. (If a page uses a built-in style sheet, your options might be overridden by the style sheet, but most of the time, your preferences will be used.) To select a font, click the related Select button and use the Font panel to configure the font. To choose an encoding method, use the pop-up menu.
If you want images to be displayed when a page is opened, check the "Display images when the page opens" check box (it is checked by default). If you use a slow connection, you might want to uncheck this check box so you don't waste time downloading images you aren't interested in.
Safari has a number of good security features, some of which you can configure on the Security pane of the Safari Preferences dialog box (see Figure 13.4).
The Web Content controls determine whether certain types of content is enabled. These controls include
"Enable plug-ins"? Determines whether any Safari plug-ins, such as those for QuickTime, Flash, and so on, are enabled. If you disable the plug-ins, content that requires them is not displayed. I recommend you leave this check box checked because most content that requires such plug-ins is safe. And, except for the plug-ins installed by default, you will choose the plug-ins you want to install.
"Block pop-up windows"? If you have ever been annoyed by the numerous and obnoxious pop-up windows that appear when you visit some Web sites, you might think that this is the single best feature of Safari. If this option is checked, Safari does not allow a Web page to open additional windows. This means that all pop-up windows that point to different URLs are blocked and you never have to see them.
Although blocking pop-up windows is mostly a good thing, some pop-up windows actually provide useful information and are necessary to get the most out of a Web site. If you block them, a site might not work well, or at all.
If you block pop-up windows and a site that needs them doesn't work properly, you can enable them again by selecting Safari, Block Pop-Up Windows or by pressing -K. This toggles the pop-up window setting, so you can also use it to quickly prevent pop-ups if you generally allow them.
To see the cookies that have been accepted, click the Show Cookies button. A sheet appears that shows you all the cookies that have been downloaded to your Mac (prepare to be astounded at their number!). In addition to the information you see about the cookies, you can select cookies and either click Remove to delete them or click Remove All to delete all the cookies on your Mac. It's not a bad idea to review this list from time to time and delete any cookies you can't recognize (or at least recognize where they came from). If a site needs a cookie to function, it creates it again.
Most cookies are relatively harmless and some even serve a good purpose, but you do need to be aware that a lot of information about you and what you do on the Web is captured whether you know it or not. If this thought bothers you, select the Never radio button so cookies are never accepted. If you do this, be aware that some sites might not work for you.
If you want Safari to warn you when you send nonsecure information to a secure site or vice versa, check the "Ask before sending a non-secure form to a secure website" check box. You'll learn more about Web security later in this chapter.
The Greatest Browser Feature Ever
That might be a bit of an overstatement, but if you frequently access secured services over the Web using usernames and passwords, such as banking or shopping sites, you might find the following feature to be the best thing about Safari. Safari is fully integrated with Mac OS X's keychain feature. Basically, this means you can store usernames and passwords from within Safari and use the AutoFill feature to have Safari enter that information for you. All you then have to do is move to the URL for the service, and the username and password are entered for you automatically. Click Login, Enter, or a similar button or link and you are in.
To enable this, Safari creates the Safari Forms AutoFill keychain item and stores usernames and passwords there.
To learn how to configure and use AutoFill for usernames and passwords, see "Using Safari AutoFill," p. 402.
To learn more about keychains, see "Securing Your Mac with Keychains," p. 900.
To see Safari's Advanced preferences, click the Advanced button on the Safari Preferences dialog box. The Advanced preferences consist of style sheet options and proxy settings.
If you have a style sheet you want Safari to use, you can add it by selecting Other on the Style Sheet pop-up menu and then selecting the sheet you want to install. If you add more than one sheet, you can select that sheet you want to use on the Style Sheet pop-up menu.
Cascading style sheets can be used to determine the formatting for Web pages. Many pages use these sheets. If not, a page is presented based on Safari's own interpretation of the HTML and the other code of which the page is composed.
You can use the Proxies button to access the Proxies tab of the Network pane of the System Preferences application.
To learn about proxy servers; see Chapter 26, "Building and Using a Network," p. 821.
Of course, you can use Safari to access the many Web search engines available, such as Yahoo, Lycos, and so on. You do this by visiting that search engine's site.
However, you can access one of the best search engines, Google, directly from the Safari Address bar. This enables some great features, most notably the SnapBack button.
If you don't see the Google Search tool, make sure the Address bar is displayed and that the Google Search option is selected.
To search the Web using the built-in Google search field, do the following:
Type the text for which you want to search in the Search box and press Return. You jump to Google and the results of your search are displayed (see Figure 13.5).
Use a link on the results page to move to a page that looks promising (see Figure 13.6).
To return to the results page so you can try other links, click the SnapBack button; select History, Search Results SnapBack; or press Option--S.
Performing a Google search from within Safari is fast and easy. Here are few tips:
To repeat a previous search, click the magnifying glass icon in the search tool; then on the pop-up menu, select the search you want to repeat.
To clear the searches you have performed, click the magnifying glass icon in the search tool; then on the pop-up menu, select Clear Entries.
To clear the current search (when the Google page is being displayed), click the x button inside the search field.
Using the SnapBack button when you search with the Google search tool is great, but you can also use this feature when you are browsing. Safari marks the first page you visit on any site as the SnapBack page. As you move to other pages on the site, you can return to the SnapBack page by clicking the SnapBack button shown at the end of the URL of the page you are currently viewing. You then move back to the SnapBack page for that site.
Here are a couple more SnapBack tips:
You can mark a page to be the SnapBack page for a site by either selecting History, Mark Page for SnapBack or pressing Option--K. Whenever you click the SnapBack button, you return to this page. (If you don't set a SnapBack page, you return to the first page on the site.)
You can also return to the SnapBack page by selecting History, Page SnapBack or pressing Option--P.
Like all other browsers, Safari enables you to bookmark Web pages so you can easily return to them. And, also similar to other browsers, Safari provides tools you can use to organize your bookmarks. However, Safari's bookmark tools are more refined and powerful than most of the browsers I've used.
Open the Bookmarks pane of the Safari Preferences dialog box to configure your bookmark preferences. On this pane, you have the following options:
Bookmarks Bar? The two Include check boxes determine whether Address Book and Rendezvous sites are accessible from the Bookmarks bar.
If you make your Address Book available from the Bookmarks bar, you can access any Web sites associated with cards in your Address Book by selecting the site you want to visit on the Address Book menu (see Figure 13.7). This is a very cool way to quickly access the Web site for anyone or any company in your Address Book.
Similarly, you can make all the Rendezvous computers that provide services Safari can access available via the Rendezvous menu. This enables you to quickly move to Web, FTP, or other resources on your local network.
Bookmarks Menu? This area enables you to add your Address Book and Rendezvous sites to the Bookmarks menu. Additionally, you can include all the Bookmarks bar's bookmarks on the Bookmarks menu by checking the Include Bookmarks Bar box.
Collections? Safari uses the term collections for groups of bookmarks. You can use collections to organize bookmarks; a number of collections are included by default. You use the Bookmarks window to work with these (this is covered later in this section).
Synchronize? If you use machines in different locations, you might find yourself adding bookmarks on one machine and not being able to use those bookmarks when you are working on another machine. If you have a .Mac account, you can synchronize your bookmarks across many machines so they all have the same set. To do this, click the Configure button. iSync opens and you can use it to register and synchronize each machine. When you have done this, check the "Synchronize my bookmarks using .Mac" check box. This causes the bookmarks on the Mac to be synced with those on your .Mac account. You can then sync the same set with other machines so you have a consistent set of bookmarks on all your machines.
To learn how to use iSync, see "Synchronizing with iSync," p. 689.
You can use bookmarks in the following ways:
Click a bookmark on the Bookmarks bar.
Select a bookmark on the Bookmarks menu.
Press -1 to move to the first bookmark on the Bookmarks bar, -2 to move to the second one, and so on up to -5 to move to the fifth one listed on the Bookmarks bar.
Open the Bookmarks window and double-click a bookmark.
Open the Address Book or Rendezvous menu on the Bookmarks bar and select a site to visit.
Open a bookmark's contextual menu and select either Open, Open in New Window or Open in New Tab.
You can bookmark Web pages with the following steps:
Move to the page you want to bookmark.
Select Bookmarks, Add Bookmark or press -D. The Add Bookmark sheet opens (see Figure 13.8).
Edit the name of the bookmark. You can use the default name, change it, or replace it with one of your choosing.
On the pop-up menu, select the location in which you want the bookmark to be stored. You can select Bookmarks Bar to add the bookmark to the Bookmarks bar, any folder to place the bookmark in that folder, or Bookmarks Menu to place the bookmark on the Bookmarks menu.
Click Add or press Return. The bookmark is added in the location you selected.
You can add a bookmark to the Bookmarks bar by dragging across the URL in the Address bar and dropping it on the Bookmarks bar. In the resulting name sheet, edit the name of the bookmark and click OK. The bookmark is added to the Bookmarks bar.
Use Safari's Bookmark tools to organize your bookmarks. You can determine the location of bookmarks, place them in folders to create hierarchical bookmark menus, rename them, and so on. To do these tasks, open the Bookmarks window by clicking the Bookmarks button at the left end of the Bookmarks bar, by selecting Bookmarks, Show All Bookmarks, or by pressing -B. The Bookmarks window opens (see Figure 13.9).
In the left pane of the window is the list of collections (groups of bookmarks). At the top of the list are the Bookmarks Bar and Bookmarks Menu collections that contain the bookmarks in those areas. Under those are the Address Book and Rendezvous collections, and under those is the History collection that contains a list of sites you have visited. Under that are the rest of the bookmark folders; Safari includes several folders with many bookmarks by default. You can add your own folders and bookmarks, as well as adding your bookmarks to existing collections.
To view the contents of a collection, select it. The bookmarks it contains are shown in the right pane. For each bookmark, its name and address are shown.
Organizing bookmarks is straightforward:
Move bookmarks from one collection to another by dragging them to and dropping them on the collection in which you want to place them. For example, to move a bookmark from the Bookmarks bar to the Bookmarks menu, drag it from the Bookmarks Bar collection to the Bookmarks Menu collection.
Create new collections by clicking the New Collection button at the bottom of the Collections pane.
Create a new folder in a collection by clicking the New Folder button at the bottom of the right pane.
Rename a collection, folder, or bookmark by selecting it, opening the contextual menu, and selecting Edit Name.
Change the URL for a bookmark by selecting it, opening the contextual menu, and selecting Edit Address.
Add a folder to the Bookmarks Bar or Bookmarks Menu collections. Then place bookmarks in the folder you created. When you select the folder in either location, a pop-up menu appears to enable you to quickly select any bookmarks in the folder.
Delete a collection, folder, or bookmark by selecting it and pressing Delete. If you delete a folder or collection, you delete any bookmarks contained in those items.
Put the bookmarks you use most often on the Bookmarks bar or Bookmarks menu because you can get to them most quickly there (if you have so many that these become cluttered, use folders to keep them organized). In the next section, you learn a technique that enables you to open an entire folder of bookmarks with a single click.
If you have spent any time on the Web, you have no doubt seen the benefits of having many Web browser windows open at the same time. Of course, you can do this with Safari by selecting File, New Window or pressing -N. If you have done this, you also know that after opening more than a couple of windows, moving back to specific windows can be cumbersome. That is where Safari's Tabs feature comes in. You can open many pages within the same window; each window appears as a tab. You then select the tab to view that page. After you have used this, you will wonder why every Web browser doesn't have this feature.
First, enable and configure the Tab feature by opening the Tabs pane of the Safari preferences dialog box (see Figure 13.10).
To enable and configure tabbed browsing, follow these steps:
Click the Enable Tabbed Browsing check box to turn on Safari's Tab feature.
If you want new tabs to be selected, so the page on the tab is displayed, as soon as they are created, check the "Select new tabs as they are created" check box.
The previously mentioned preference affects what the tab keyboard shortcuts do. If you don't enable this preference, you have to physically select a tab after you create it to view it. I have assumed that this preference is enabled for the rest of this section.
If you want the Tab bar to be shown, check the "Always show tab bar" check box. If don't check this, the Tab bar is shown only if at least one page is being displayed.
Close the Preferences dialog box.
Notice the keyboard shortcuts at the bottom of the Tabs pane. These are important tips that help you effectively work with tabs. If you can't remember them, they are listed in the next section and in Table 13.4 at the end of this chapter.
After you have enabled tabs, the Safari window contains a tab for each Web page you have opened. To open a new tab and display it, hold down the key while you click a link or bookmark. The page opens and appears in a new tab. You can open as many tabs as you like (see Figure 13.11).
Following is a list of tab tricks:
Click a tab to view its Web page.
To close a page, click the x button in its tab. The tab and page close.
To open a page in a new tab and move to it, -click a link or bookmark.
To open a new tab without moving to it, -Shift-click a link or bookmark.
To open a link or a bookmark in a new window and view it, -Option-click it.
To open a link or a bookmark in a new window but not view it, -Option-Shift-click it.
The previous four actions are reversed if you uncheck the "Select new tabs as they are created" preference. For example, you would -Shift-click a link or bookmark to open it in a tab and view it.
To move into the next tab, choose Window, Select Next Tab or press Shift--right-arrow key.
To move into the previous tab, choose Window, Select Next Tab or press Shift--left-arrow key.
Okay, I have saved the coolest thing about Safari for this moment: Safari enables you to open as many pages as you want by clicking a single bookmark. Each page included in the group opens in a new tab. If you frequently open the same set of pages, you can click a single folder to open them all at the same.
First, create the group of bookmarks you want to open:
Open the Bookmark window and create a folder in the Bookmarks Bar collection.
Check the Auto-Tab box for the folder you just created.
Place bookmarks for all the sites you want to open simultaneously in the folder you created in step 1.
To make moving bookmarks into folders within collections easier, open a second Safari window and view the Bookmarks window. You can drag bookmarks from the first window onto the second to move them among collections.
Close the Bookmarks window and click the button on the Bookmarks bar for the folder you created in the previous steps. Every page opens in its own tab. Working with a set of Web pages has never been so easy.
If you access services on the Web, such as travel planning, shopping, banking, and so on, you no doubt have a lot of experience filling out the same information time and time again. Completing a Web form is fun the first time, but after completing your address, phone number, username, and password a few dozen times, it gets old. This is where Safari's AutoFill feature comes in. It enables you to complete various kinds of information automatically or at the click of the AutoFill button.
Using AutoFill, Safari can enter the following types of information for you:
Your Address Book information? Safari can access the information stored on your card in your Address Book. This can include your address, phone number, Web site, and so on.
To learn how to configure the information on your card in your Address Book, see "Creating and Editing Your Own Address Card," p. 338.
Usernames and passwords? Safari can capture your username and password at many Web sites. When you return to those sites, your username and password are entered for you automatically.
Information entered on various Web sites? As you provide information in other types of Web sites, Safari can gather this data and remember it so that the next time you visit a site, you can complete any information by clicking the AutoFill button.
First, you need to tell Safari which AutoFill features you want to use by configuring your AutoFill preferences:
Press -, to open the Preferences dialog box.
Click the AutoFill button to the AutoFill pane (see Figure 13.12).
If you want Safari to be able to enter the information from your Address Book card, check the "Using info from my Address Book card" check box.
If you click the top Edit button, the Address Book application opens and you jump to your Address Book card in the edit mode so you can make changes to it.
If you want Safari to capture usernames and passwords at various Web sites you use, check the "User names and passwords" check box.
If you want Safari to capture other types of information you enter on the Web, check the "Other forms" check box.
Close the Preferences dialog box.
Using AutoFill is straightforward.
To enter your personal information from your Address Book card, use the following steps:
Move to a Web page that requires your personal information, such as name, address, and so on.
Click the AutoFill button on the Address Bar; select Edit, AutoFill Form; or press Shift--A. Safari transfers the information from your card in your Address Book and places it in the appropriate fields on the Web form.
Review the information that was entered to ensure that it is correct. AutoFill isn't perfect and sometimes Web forms use slightly different terms for data.
If you find AutoFill consistently not entering specific information, add that information to your card in your Address Book.
To use the username and password feature, do the following steps:
Move to a Web site that requires a username and password.
Enter your username and password on the page.
Click Login. You are prompted about whether you want Safari to capture the username and password for this site.
In the prompt, make one of the following choices:
Click Yes if you want the information to be added to AutoFill.
Click Not Now if you don't want the information to be captured at this time but want to be prompted the next time you access the site.
Click "Never for this Website" if you don't want the information captured and never want to be prompted again.
If you click Yes, the next time you visit the Web site, your username and password will be filled in automatically. All you have to do to log in to the site is click the Login button or link.
The username and password feature is convenient, but you shouldn't use it unless you are the only one who uses your Mac OS X user account or the people who share your Mac OS X user account are very trustworthy. Because the usernames and passwords for your accounts are entered automatically, anyone who uses your Mac OS X user account and moves to the related Web sites can log in to your account on that Web site.
If you decide you don't want to provide automatic access to a specific Web site, you can remove that site's username and password:
Open the AutoFill pane of the Safari Preferences dialog box.
Click the Edit button next to the text "User names and passwords." A sheet appears that lists each Web site and username you have captured in Safari.
Select the Web site you want to remove.
Click Remove All to delete all the Web sites for which you have captured usernames and passwords.
Click Remove. Continue removing Web sites until you have removed all the sites you no longer need.
Click Done and close the Preferences dialog box.
If you don't turn off the username and password feature by unchecking the "Use names and passwords" check box, you will be prompted by AutoFill the next time you visit any Web sites you deleted from the list.
Using the AutoFill feature for other kinds of forms is similar to the first two. When you enable the "Other forms" feature and enter information in Web sites, that information is captured. When you return to those sites in the future, you can enter the information again by clicking the AutoFill button; selecting Edit, AutoFill Form; or pressing Shift--A. You can edit the list of Web sites for which information is remembered by clicking the Edit button next to the text "Other forms" on the AutoFill pane of the Safari Preferences dialog box.
As you move around the Web, Safari tracks the sites you have visited. You can view this information on the Activity window. To do so, select Window, Activity or press Option--A. The Activity window appears, showing the sites you have visited. You can expand each site to see the individual pages you have visited and double-click any of these to return to that page.