Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Reload Safari tabs in the background via AppleScript Web Browsers
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.
  • Currently 2.46 / 5
  You rated: 1 / 5 (13 votes cast)

Reload Safari tabs in the background via AppleScript | 0 comments | Create New Account
Click here to return to the 'Reload Safari tabs in the background via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.