Today I found that Apple's MobileMe login page redirects so quickly that I can't even see what domain I should add to NoScript's whitelist so that I can login.
Trial and error led me to a solution: Add auth.apple.com to NoScript's whitelist. To save you the time of testing others, I'll tell you here that I had already tried both me.com and mobileme.com, with and without a leading http://www. or www., but neither worked.
I frequently have multiple Safari tabs open. I'll be viewing a site, and one of the other tabs is a site I've already viewed, but will want to view again after some time has passed and it's been updated. It is possible to keep a tab in the background and reload it by right-clicking and selecting Reload Tab, but that seemed inefficient and like an interruption to whatever content I was currently viewing.
A quick trip into Applescript and I came up with this script to reload the first tab in the background:
tell application "Safari"
set sameURL to URL of tab 1 of front window
set URL of tab 1 of front window to sameURL
end tell
A few notes:
This script requires a launcher (Script Menu, Butler, Keyboard Maestro, Spark, etc.) to allow execution via the keyboard.
I made three of these scripts, one for each of the first three tabs in a window. The tab 1 in the script reflects the first (left-most) tab. Make as many versions as you'd like, just change the 1 as needed.
Since Control-[number] is not used by Safari (like it is in Firefox), it's a reasonably good and easy-to-remember keyboard shortcut if your script-launching method allows for this.
This script has been successfully tested with the Safari 4 Beta and with Safari 3.
This hint combines two common documented tools into a time-saving trick. It requires is that you have a picture for your desktop. To use that image as your desktop picture:
Open the picture in Safari. This is likely not a default image viewer, so Control-click on the image and use the Open With menu. As long as it's a common format -- JPEG, TIFF, PNG, etc -- Safari should automatically appear. You can also drag the image onto Safari's icon in the Dock, which is even simpler.
In Safari, Control-click on the image and select Use Image as Desktop Picture.
VoilĂ ! That's it; this is so much faster than manually adding a photo through the Desktop & Screen Saver System Preferences panel.
[robg adds: While this is indeed a quick way to set a single image as a desktop background, it doesn't actually add the image to an existing collection; it merely sets the selected image as the desktop background. If you want to add the picture to a rotating set of images, you'll have to do it yourself. I do this by specifying my own folder of images to use for desktop images, then just adding pictures to that folder.]
After having changed over to Safari a few months ago, I noticed the lack of a fast plug-in for my Delicious bookmarks. The delicious.com website is okay, but when you use it a lot, its lack of speed can be annoying.
Hence I decided to write my own super fast Delicious 'plug-in' which isn't actually a plug-in at all. Instead, it's entirely browser-based; you can try it out at this URL. The site makes use of a new feature of HTML5 which allows you to have local storage of remote data. This makes the site very fast, but currently Safari 4 Beta is the only browser that supports this feature.
[robg adds: I haven't tested this one, as I don't have any public Delicious bookmarks, which is what the site works with. As a result, you don't need to enter your Delicious password to use the site -- so you can test it without fear of password harvesting.]
Imagine you have some files named document.txt, picture.png and music.mp3 in your Downloads folder, and you want to make copies of these files with another name, in order to preserve them in some way. You can simply use Finder's duplicate function, of course, and end with filenames ending in the word copy, or you may do the following.
Open Safari, open its Downloads window (Window » Downloads), and drag ythe files to duplicate into Safari's Download window. If the files already exist in the Downloads folder, Safari will "download" them again, but add numbers to the filenames to keep them unique. For example, document.txt will be saved again as document-1.txt, then document-2.txt, etc. This trick can thus be used to create sequentially-named files.
If the original file is not in the Downloads directory, this tip can help creating duplicates of files, instead of moving, if you are dragging from the same disk (as you can do if you hold the Option key down).
Just a quick heads up on a Safari 4 Beta/Mail issue in OS X 10.5...
If you're using Safari 4 Beta in 10.5, you won't be able to save emails from Mail in RTF mode. Mail will appear as though it saved the email (no error messages appear), but it won't actually do anything.
The only fix as of now is to run the uninstaller for Safari 4 Beta and downgrade to safari 3.2.1. Otherwise, you'll just have to live with not being able save email as RTF. The issue seems to be with a webkit incompatibility
[robg adds: I can confirm this issue exists on 10.5; I no longer have a 10.4 test machine, though, so I'm not sure if it exists there as well.]
When I installed Safari 4 Beta, I started to play around RSS feeds for the first time. But there was one thing that made me crazy: I couldn't figure out how to mark all new articles as being "read." This is a problem if an RSS feed shows something like "38 new articles" and you just want to catch up in a hurry.
One day, when I hit the reload button, I found out that all articles were read after that. Tried it out on many RSS feeds in Safari 4 and it worked for all of them.
[robg adds: This also works in Safari 3, as was mentioned here briefly in the comments to this hint. Note that you'll probably also want to visit the RSS tab in Safari's Preferences and enable the "Highlight unread articles" option to more easily see which articles have not been read.]
Setting your home page to a defined size and position results in much more consistency in subsequent windows. So I use the following code to set window size and position, defined by URL parameters, before redirecting to my home page. These parameters are: width of window, height of window, horizontal position of window, vertical position of window, and link to home page.
<body onload='z=window.location.search.substring(1).split(","); s=z.length; if (s>1) { window.resizeTo(z[0], z[1]); if (s>3) { x=z[2]; y=z[3]; if (1>x) { x=1 }; if (1>y) { y=1 }; window.moveTo(x, y); if (s>4) { window.location=z[4] } } }'>
To use this, you can either use this page on my server (it also has further details and a demonstration), or create your own HTML page that uses the above tag. You'd then load that page, with your preferred size and parameter settings, and append your home page URL to the end of the URL. Alternatively, you can copy the page from my server to your local computer, and modify it to meet your needs.
Note that I am only advocating that those who wish to can opt to control the default size/position of their home page. Putting such code on public pages would be most unpopular. My experience is that, for various reasons, a few hours web browsing can result in browsers being closed with the final page in an unwanted position. I am surprised that browsers don't come with a control to at least start the day with user defined window size and position. There has been considerable recent interest in bookmarklets and JS in home page links (does not work for WebKit) to achieve this. My page attempts to provide a simple cross browser/platform solution.
[robg adds: I tried this via the author's page, and it worked as described. Note that, after reading some of the comments indicating some confusion about this hint, Neville sent me some additional clarifying text, which I have now included in the hint itself.]
If you'd prefer Safari never remembered favicons, here's a simple way to do just that, while also removing any currently-stored favicons. Quit Safari if it's running, then open Terminal (in Applications » Utilities) and enter these commands (don't enter the $; that's just the prompt):
The first command sets the proper working directory, the second removes the current favicon database, and the third recreates the database file, but links it to /dev/null, so that any output written to the file is summarily discarded.
[robg adds: This works as described, though I personally prefer to keep the favicons. Note that this hint replaces this one, which only works for older versions of Safari.]
In Safari 4 Beta, the Top Sites page displays thumbnails of your top sites. This feature can take a lot of disk space; if you'd like to use Top Sites, but disable the thumbnails completely (as opposed to just disabling their updates, which you can do via Safari's menus), here's how.
Quit Safari, open Terminal (in Applications » Utilities), and enter this command:
Relaunch Safari, and it will no longer create snapshots of pages you visit.
[robg adds: I tested this, and it works. However, to really take advantage of it, you'll also want to delete the existing snapshots from your drive. The easy way is to use Safari -> Reset Safari, and leave only 'Remove all webpage preview images' checked, then click Reset.
If you delete all the existing previews and implement this hint, you'll see a generic placeholder for each page on the Top Sites screen. To get your previews back, quit Safari, and run this command in Terminal: defaults delete com.apple.Safari DebugSnapshotsUpdatePolicy. You won't see new previews until you visit each site on the Top Sites at least once.]