As input managers are in danger in Safari 3.0 and later versions, it might be useful to know that a type-ahead search feature that emulates Firefox can be enabled in Safari using a fairly simple hack that involves native OS X tricks.
To do so, quit Safari and go to System Preferences » Keyboard & Mouse » Keyboard Shortcuts. Click the '+' to add a new shortcut, select Safari as the Application, Find... as the Menu Title, and a temporary (and arbitrary) shortcut as Keyboard Shortcut. (Note that this field does not allow a simple entry, such as '/', but instead requires a modifier key like Command or Option.)
Now go to ~/Library/Preferences and edit com.apple.Safari.plist. (You may be able to just double-click and open the plist in Property List Editor if you have Xcode installed.) Find the NSUserKeyEquivalents entry and edit the string entry for Find..., replacing the arbitrary shortcut you entered earlier with /. This will remove the need for a modifier key, and allow / to activate search.
Now relaunch Safari and type /; you should see the Find box appear, emulating the type-ahead search in Firefox.
[robg adds: Queue user fds offers up a one-line Terminal alternative to creating this shortcut: defaults write com.apple.safari NSUserKeyEquivalents -dict-add Find… /. He also points out the downside of this modification: if you're in a text box, you won't be able to activate the search box, as the text box will accept all the '/' keystrokes, as it should. With the default of Command-F, you can use find even when a text field has focus.
If you'd like to undo this modification, and you used the long method above to create it, you can just delete the entry in the Keyboard Shortcuts list. If you used the Terminal shortcut, though, there won't be an entry there. You can either add it and then delete it, or this should work in Terminal: defaults write com.apple.safari NSUserKeyEquivalents -dict-add Find… @f.]
If you bookmark an RSS feed with Safari, and then enter some terms in the Search Articles box, Safari will remember what was in the box and hold that search, after navigating away from that feed and back to it, and even between restarts of Safari.
This could be useful for only ever seeing RSS articles from a feed with certain specific keywords.
This can also be annoying as you may wish to view new articles in a feed, but they don't show up because the last time you viewed the feed you left some search terms in the box.
[robg adds: I tested this one, and it only works in the 10.5 version of Safari. I'm not sure if it's a bug or a feature, but it could be useful.]
If you use the Web Clip feature in safari, you can cut out a Flash game and play it with full functionality in Dashboard.
[robg adds: Just remember that there's no way to save your web clips as widgets -- so if you close the widget itself in Dashboard, you'll need to recreate it from the original website the next time you want to play.]
I really miss the keyword feature of Firefox when I use Safari. For those who don't know it, it allows to define keywords, like for example img and link it to a search engine, for example, images.google.com. You just have to type img dog in the address bar to get the results of Google Image directly, without even going to the query page. I have written the following AppleScript to get a similar behaviour using Safari.
When run, the script will ask you for a query string. The first word is the keyword, the rest are the parameters. For example, type gg Macos to search for Macos in Google, or img cats dogs to search for cats dogs on Google Images. Here's the code:
To install it, open the AppleScript Editor (from /Applications/AppleScript), copy/paste the script, and save it in your user's Library/Scripts folder as MySearch. Then, you should bind the script to a hot key (a shortcut). I personally use FastScripts to bind the key Command-Shift-K, but there are probably other solutions. With this configuration, a difference with the Firefox keywords (which is also a feature) is that Safari doesn't need to be in the foreground. Just press the hot key from whereever you are, and it will bring Safari to the front and ask you for your query.
To add search engines, you will have to edit the function keywordToURL at the beginning, which contains already some examples, and is hopefuly easily understandable. First, use the browser normally to search for (on the desired site), for example, xyz123. Have a look at the resulting URL. Notice where your xyz123 is in it. We will call everything before the search term PREFIX, and everything after it SUFFIX. Add a new section to the script similar to the existing ones:
else if theKeyword is equal to "YOURKEYWORDHERE" then
return "PREFIX" & p "SUFFIX"
The p will be replaced by your parameters.
[robg adds: This worked as described for me when I tested it.]
After I updated to Safari 3, AcidSearch stopped working properly, so I uninstalled it. I got Inquisitor instead, but I missed the ability to do a Google site search on whatever site I was visiting. So I put together this AppleScript, mostly assembled from other people's scripts:
[robg adds: To use this, save it as a Script in ~/Library/Scripts/Safari, and make sure the Scripts Menu is enabled. Then just select it while visiting any page in Safari, enter the search term in the box, and you'll run a Google search restricted to that site. It worked fine for me when testing.]
Many people may not be aware that when visiting web pages that feature graphics, audio, and video, that much of this stuff ends up in an oddly-numbered file in your browser's cache folder. (You can find these folders in your user's Library/Caches folder.)
Today, I discovered that Leopard's Finder can now actually display much of this cached content in the Preview area of a Finder window (or via Quick Look), rather than just showing a generic document icon.
[robg adds: This works for cache files from Camino and Firefox, but not Safari -- Safari now stores its cache in a single .db file, instead of a number of independent files. Many cache files won't preview, but those with graphics, audio, or video seem to work fine.]
Here's a unique way to use Safari's web clip feature to create your own widget. I set up a countdown timer and generated the HTML, using this countdown generator. I then copied the HTML source, pasted it into TextEdit, added <html><head></head><body> at the top, and </body></html> at the bottom, and saved it to the Desktop as an HTML file.
Then I opened it in Safari, and used Web Clip to make my own widget from the output. Bingo -- a customised widget!
[robg adds: The theory here is more interesting than the actual example of a countdown widget, given the number of such widgets that are already available. Basically, grab an HTML snippet from a page that generates such things, add the basic HTML tags around it, then create a widget from the output.]
For .zem files, sometimes offered by Plone content management systems, to be treated as safe by Safari and similar applications, you may add three strings to your DownloadAssessment preferences file. Here's how:
Launch Terminal, and convert the plist into editable form:
When using Safari 3 in 10.4 or 10.5, you can select a URL from a source (Safari, TextEdit, another browser, whatever), and drag it to an empty space in Safari's tab bar. When you drop the URL, Safari will then open another tab with this URL.
[robg adds: If you drop the text in Safari's main window, instead of the tab bar, the URL will open in the current tab.]
When viewing a password-protected PDF from within Safari, or by selecting Open in Preview from Safari's Contextual Menu, the option to save the PDF doesn't exist, nor does the Print to PDF option exist within the Print Dialog box.
However, if you copy the PDF's URL, open the Downloads window (Command-Option-L within Safari) and then paste the URL, the PDF will start to download (i.e. be saved).
[robg adds: A comment on the queue site notes no copy is required; just drag the icon next to the URL into the Downloads window. Note that this hint doesn't defeat the password protection; it merely allows you to download the document.]