Reload Safari tabs in the background via AppleScript

May 28, '09 07:30:00AM

Contributed by: NaOH-Lye

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 has been successfully tested with the Safari 4 Beta and with Safari 3.

Comments (0)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20090526225003768