How to save search URLs in Safari 6

As you’ve probably heard, Safari 6 has a new combined URL and search field. If you type a search term into that field then press Return, you’ll get a Google page with search results. But, oddly, the URL for that Google search won’t appear in that search-address field; instead, the search term itself will remain there. This can be frustrating, because sometimes you want the URL for the Google results page, either to save or to share.

Macworld Senior Editor Dan Frakes recently tweeted a quick AppleScript that enables you to get that Google search URL. Many Tricks developer Peter Maurer suggested an improvement to the script, then Jordan Kay posted a final, one-line version of it. The sum of their collaboration: Run the following script and it will save the URL for the frontmost Safari tab to the clipboard; from there you can paste it wherever you want.

tell application "Safari" to set the clipboard to URL of current tab of window 1 as string

(To use the script, open AppleScript Editor, paste the above text in a new window, then save it as an application. You can then double-click that application to run it.)

Frakes later pointed out a second way to save Google searches: You can drag the favicon in the Address Bar to a Finder window after you’ve run a search. (For a search, the favicon is the magnifying glass icon at the left of the search field.) You can then double-click the resulting file to run the search again, or you can press the Spacebar to Quick Look it and see a live search with clickable links. Alternatively, you can drag the favicon to the body of an email message or into a text field or document to immediately paste the link.

Finally, you can save a search-results page as a bookmark in Safari: Run a search, then choose Bookmarks -> Add Bookmark, or press Command-D. If you save it to the Bookmarks Bar, you can right-click on the bookmark and choose Copy to get the search URL.

Shop ▾
arrow up Amazon Shop buttons are programmatically attached to all reviews, regardless of products' final review scores. Our parent company, IDG, receives advertisement revenue for shopping activity generated by the links. Because the buttons are attached programmatically, they should not be interpreted as editorial endorsements.

Subscribe to the Help Desk Newsletter

Comments