I have been frustrated by Safari using IPv4 by default for websites that have both IPv4 and IPv6 address (most other browsers and IPv6 enabled applications will attempt to use IPv6 before IPv4 if you and the remote server have v6 addresses). Then I noticed that Safari was attempting to connect to servers with an IPv6 address first when accessing secure sites using https: (SSL).
So I turned on the Safari Debug menu. If you go to Debug -> Supported Protocols and turn off http: (Simple Loader), then http: behaves the same way as https: using the CFNetwork loader (correctly).
Sadly this option is not preserved between launches of Safari, and I cannot see a way of setting it in the preferences .plist. Perhaps it can be scripted ?
I tend to google a lot and click through a lot of links in one window. If the URL window is active and you hit the delete button, it will bring you back to the last link, this is sort of a last link snapback. I was used to hitting the back button with the mouse, but now i can just Delete away. Please note that Command-[ does this, too, but this is yet another way to move around Safari quickly.
[robg adds: I thought this had been documented here before, but I can only find a passing mention of it in the comments. The shortcut is documented in Safari, but only if you've enabled the debug menu; you can then see it (and others) on the Keyboard and Mouse Shortcuts page ... or just click this link to view the page (assuming you have Safari installed in the default location).]
Tired of Safari timeout when you're waiting for a database query, a large upload, etc? SafariNoTimeout 1.0 (Released: 4/16/2003) is a hack that changes the Safari 60 second connection timeout limit to be 10 minutes instead; for Mac OS X 10.2 or newer.
Okay, this happened to a friend and I. Safari just suddenly stopped working for us. It acted like it was loading the page, but it never actually displayed anything. It would just hang there and do nothing. Another hint that you might be having this problem is when you load up your Console (in Applications, Utilities), you get error messages like:
2003-12-28 02:35:42.830 Safari *** -[NSCFString characterAtIndex:]:
Range or index out of bounds
2003-12-28 02:35:43.766 Safari ***NSTimer discarding exception
'*** -[NSCFString characterAtIndex:]: Range or index out of bounds')
that raised during firing of timer with target 192c670 and selector
This seems to happen after installing Windows True Type fonts on your Mac. I'm not exactly sure what about the fonts caused Safari to explode, but I seem to have found a way to fix it.
Basically, you just go into your Safari preferences and change the font, and then you can change it back after you can see that Safari will load pages again. It appears that the default font that seems to cause trouble is Times. You might be using something else, but it's a worth a shot to try this anyway. If it won't let you change the font in Safari (it wouldn't let me do this), you can go into Font Book under Applications and temporarily disable the font. Then open up Safari and it should be using a different font (Helvetica for me). Then it started loading pages again for me.
Of course, if you liked Times better, you can then go back, reenable Times, and set it back again. I did this just fine, and am currently using Safari with the Times font again. Everything I wrote here worked fine for me, but I have yet to see if it'll work for my friend.
[robg adds: This seems like an issue related to one particular font; I have several Windows TrueType fonts on my machine, and Safari is working just fine ... but it does point to the subtle nature of font problems -- it's odd to connect a page not loading with a font issue; you'd think the page would just load with a default font instead.]
Are you tired of having to press Command-Shift-arrow in Safari, and Command-Shift-[ in Camino to change tabs? The solution's actually pretty obvious, and this bugged me enough to fix it. I prefer using Command-arrow to switch tabs, and all you have to do to fix it is edit the MainMenu.nib file.
Note: you must have the developer tools installed to do this
Control-click on /Applications/Safari and choose Show Package Contents. Go to Contents -> Resources and open up MainMenu.nib. Click the Window submenu, and then double-click on the shortcut key command-shift-arrow. After you double click on it, you can rebind it to whatever you like by just typing your shortcut keys.
This can be done similarly in Camino by going to /Applications -> Camino.app -> Contents -> Resources -> English.lproj/ and opening MainMenu.nib.
I usually don't want the Safari Downloads window to grab focus (come to the front) when I begin a download. I noticed that the window only grabs focus when a download is added to an empty downloads list. Unfortunately, I also prefer the 'Remove item upon successful download' option. Thus, almost every time I start a download the Downloads window grabs focus.
To work around this, I simply started a download and then canceled it, leaving it in the Downloads window. Now when I start downloads, the window stays in the background, and I can continue browsing unhindered.
Normally, when you are editing text, Command-Right Arrow will move you to the end of a line of text, and Command-Shift-Right Arrow will select to the end of a line of text.
However, in Safari, Command-Shift-Right Arrow will select the next tab (or do nothing if you only have one tab open). To work around this, use Control-Shift-Right Arrow instead. Similarly for Command-Shift-Left Arrow, use Control-Shift-Left Arrow.
I don't know how Command-Shift-Arrow works if you have tabs disabled, but everybody uses tabs anyway, right?
Sometimes I want to open multiple web sites that are stored in Safari's history file. Two limitations always made this inconvenient: Page Up and Page Down do not work in the bookmarks window, and the history doesn't remember the date that the user was last looking at when the history opens in a new tab. So the process was: create a new tab, expand the date of the history I'm interested in, click the scroll bar until I see the site I want, double-click the site, rinse, repeat. Quite a lot of effort for something so simple.
Then I had an idea I thought I would try out. I created a new Safari window and displayed the history in that window. I then drag-and-dropped a site from the history window to the address field in my original window, and it loaded the site. Now my proces is: drag site to address field, hit Command-~ (to change back to the view window), hit Command-T (to create a new tab), and finally, hit Command-~ (to get back to the history window); repeat as needed. I find this much faster.
If you point your Firebird browser at about:config (instead of http://whatever.com), it gives you access to your user.js file, which is where you can override your useragent string (among other things).
If you Control-click, it will allow you to add a new string. Name the string general.useragent.override. Give it a value equal to anything in this list. Firebird is now masquerading as your new user agent.
The Safari dock icon behavior has always annoyed me. If you have no windows open and click on it, it will open a new Safari window. Great. However, if you have other windows open or minimized to the dock, it will just restore the last window you had open, which I find annoying. My solution: AppleScript.
You can use the System Events feature of OS X to activate any menu options. For this to work, you must have "Enable access for assistive devices" enabled on the Universal Access system preference pane.
Create a new AppleScript program in Script Editor with the following code, and save it as an application:
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
click menu item "New Window" of menu "File" of menu bar 1
Now, find some spiffy icon to assign to your new application and drag it to the dock. I put this application right above the real Safari application, and assigned it a different icon. When you click on this new program, it will open a new
Safari window. One quirk is if Safari isn't already running, it will launch two windows since Safari loads one on startup. I've only tested this on 10.3.