This was touched on in a comment from a prior hint, but I think it's worth a standalone hint: You can drag any text to Safari's dock icon to perform a Google search of that text.
This is useful for quickly checking up on things without going to the keyboard. I discovered this when, on a whim, I dragged a line from Console onto Safari, and it brought up a search of that Console error.
This hint is really just a link, but there have been several other hints dealing with PDF plug-ins for Mac browsers -- the Adobe plug-in only supports Safari) -- and this represents the first real solution for Firefox 3 I have seen.
There is now a Firefox extension named firefox-mac-pdf, available for Firefox 3 under OS 10.5 that utilizes the built-in PDF support in OS X to display PDFs in-browser. In my testing, it appears to work very well. It doesn't have the nifty fading bezel that the Safari PDF viewer does, but it supports all the same keyboard shortcuts and you get the standard Mac OS PDF contextual menu when you control-click on a displayed PDF.
[robg adds: This plug-in takes care of the only major complaint I had about Firefox; being able to view a PDF inline instead of opening it in Preview after downloading is a nice timesaver. I tested the plug-in this morning with about a dozen PDFs, and it worked great on all of them. The hint was submitted noting "Intel only," but the plug-in seems to work fine on my 12" PowerBook G4, too.]
[Updated 6/19: Removed 10.5-only restriction on hint.]
One of Firefox's niftier features is its full page zoom -- when you increase or decrease the size of page, everything on the page (text, images, etc.) zooms or shrinks at the same time. This helps keep the layout of the page closer to the original design when zooming; the end result (to me, anyway) looks nicer than when zooming just the text. The shipping version of Safari, on the other hand, only zooms or shrinks text, not images and other elements.
If you're running the WebKit version of Safari, however, you can activate full-page zooming using a simple Terminal command. Thanks to pamon for emailing me a pointer to this page on the Surfin' Safari blog that reveals the Terminal command. Quit Safari and WebKit, then enter this command in Terminal:
Launch WebKit, load a page, then experiment with Command-Minus and Command-Plus (technically, Command-Equals). You should see that all objects on the page are being resized, not just text. Note that Safari, because it uses an older version of the WebKit engine, won't be able to do full page zooming, even after running the above Terminal command. To reverse the settings, reverting WebKit to the "text only" zoom mode, repeat the above command, but change 1 to 0.
If you're a web developer on the Mac, you may be sick of everyone talking about Firefox add-ons that do seemingly everything. True, Firefox is a great browser that is very expandable, but I love Safari, and I want to do as much web development on Safari as possible. The Firefox add-on feature that I missed the most in Safari was Disable Styles and Disable Javascript, both of which are super-easily done in Firefox via the Web Developer Plug-in. With the advent of Safari 3, disabling CSS and Javascript can be done with a couple of (user definable) keystroke combinations.
To gain control over JavaScript and CSS in Safari, open its preferences, and switch to the Advanced tab. Check the box labeled 'Show Develop menu in menu bar.' You should now see the Develop menu; if you activate it, you'll see a number of options for disabling certain web features, including CSS and JavaScript. Now you can use the Keyboard System Preferences panel to assign keyboard shortcuts to anything in this menu, as you would with any other menu item. I assigned Shift-Command-S to Disable Styles, and Shift-Command-Option-S to Disable Javascript. Obviously, you can create shortcuts for anything else in the Develop menu using the same technique.
[robg adds: I extensively modified the above hint, shortening it quite a bit and rewriting the how-to section. If you'd like more details on precisely how to create the keyboard shortcuts, including screen shots of each step, you can read the original version of the hint in the author's blog entry.]
When the user single-clicks in the address bar in Firefox 3 (currently at RC1 -- download | end user features), the default behavior is to select the entire contents of the address bar. The expected behavior for most other OS X browsers, including Firefox 2, is to insert the cursor at the click location. To restore Firefox 3 to sanity:
Type about:config in the Address Bar and press Enter.
If you get a message warning you about changing advanced settings, click "I'll be careful, I promise."
Locate the preference named browser.urlbar.clickSelectsAll and double-click it to change its value to false.
That's it. Firefox should be back to it's old behavior. Note that you can still double-click the Address Bar to select a word, and triple-click to select the entire URL.
For some reason, Apple has given Safari very little patience in waiting for DNS queries -- it quite often gives up on a query and won't load a page, even though that page will load fine in Firefox or another browser. If you need to use Safari, though, you can use this script to look up the IP address of the site and load the page using that instead:
The easiest way to use it is to add it to your Safari script menu (by putting the script file in your user's Library » Scripts » Applications » Safari folder; create the folder if necessary). You can then select it from the Scripts menu when you're trying to load a page that seems to be stuck.
Be warned, though, that sometimes the page still won't load due to virtual server redirections that happen silently when given a DNS name. (This script was originally posted in this entry on my blog.)
If you're developing a non-trivial bookmarklet you may be able to speed up your edit cycle by having an applescript which executes the javascript in your browser, like this:
tell application "Safari"
activate
do JavaScript "
// Of course your bookmarklet code goes here, for example...
alert('hello world');
" in front document
end tell
I just edited the Javascript in Script Editor and hit the run button to test. Just be careful of using double quotes, and you can postpone escaping the script and adding it to your bookmarks until the very end.
If you are like me and love using Safari as the default browser and also subscribe to Sprint's Family Locator service, you may have to switch to Firefox in order to access their website.
Not the case anymore. You must first enable the Develop menu in Safari, which you can now do in the Advanced section of Safari's Preferences panel. (Older versions must use the solution in this hint). Then click on the Develop menu in Safari, choose User Agent, and select the latest version of Firefox for Mac from the list before you log into the Sprint Family Locator website.
You will now be able to login and browse Sprint Family Locator website with Safari. So far, I have not noticed any features that don't work when using this workaround.
You can use Safari 3.x to open Text files (they must have .rtf or .txt extensions), and then use Safari's Find feature to locate what you're looking for in the file. The advantage is that you get Safari's wonderful new 'find' UI instead of just plain old search results or filtered text.
In context, This is how I use it. There are periods of time when I do a lot of searching through log files. In doing so, I'm often looking for a particular phrase, and I also need to see the log data around that time period. Using Console just doesn't cut it for me, because when I put the search term in, Console blocks out all other data in the file. Opening the log file in TextEdit will allow me to highlight each hit individually, which is better, but still not perfect.
When I use Safari, however, it highlights all of the hits, and grays-out the other text. This allows me to quickly find associations between the search phrase and other things happening at that time. Of course, as mentioned, I do have to get the data into a .txt or .rtf file to do this, but hopefully, Safari will support other plain text extensions in the future. (Right now, if you try to drop a .log file on Safari, it will show you where it is in the Finder.)
In my job, I jump between browsers quite regularly, usually Firefox, Camino, and Safari. As we've covered here before in various hints, you can actually run a "future" version of Safari by downloading and installing WebKit, which is a special version of Safari using newer builds of the WebKit web browser engine. WebKit builds can be faster than the currently-released version, and have bug fixes and new features that you can take advantage of. As one example, the WebKit version of Safari currently passes the Acid3 browser test with a perfect score, while the released version of Safari scores a 75 out of 100.
One minor issue with using WebKit, however, is that it sets the default 'new window' page to this page, which thanks you for helping test WebKit, and lets you know there's a new nightly build available. This constant reminder helps insure that the WebKit team doesn't get bug reports against older nightly builds, but it gets annoying relatively quickly. (As a side hint, you can use NightShift to automatically download and install new nightly builds; highly recommended.)
If you'd like your Safari home page back while using WebKit, you'll need to use a simple Terminal command, which is documented on this page on the WebKit site (quit WebKit first):