Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Phat^Trance

macrumors 6502a
Original poster
Aug 9, 2009
535
43
Is there a way (shortcut key?) to reload all tabs in safari?

I found some plugins in app store, but they cost like 3 dollars here in Sweden, which is pretty high for such extensions.
 
Open Automator and have it start a new document. Choose "Service" for the type of document. At the top of the window click the pop up button and scroll to the bottom and choose "No Input". For the next button choose the Safari application.

Next using the Automator's library, double-click on "Run Applescript" and the framework for it will show up in the right hand pane. In this pane copy the following script:

tell application "Safari" repeat with i from 1 to the count of windows set this_win to (window i) repeat with j from 1 to the count of every tab in this_win do JavaScript "window.location.reload()" in (tab j of window i) end repeat end repeat end tell

Now save this, I named mine "Reload All Tabs" and close Automator. Or you can test is by running it from Automator.

EDIT: apparently copying code into the window here keeps the indentation in preview but not when posted.
EDIT II: fixed 😎
 
  • Like
Reactions: chown33
Is there not a free extension for this, like in chrome? Seems a bit daft to have to type a load of code imo.
 
^ You don't have to type any code. You can simply copy and paste it into the correct location in the Automator window's Run Applescript pane.
 
...forgive me, but after creating the service and saving it through Automator, how do you routinely access it? Struggling to figure out how to activate this easily, let alone find it. I have my scripts folder up on the top of my Mac menubar enabled where I've stored some old iTunes/Music userscripts (thanks dougs scripts!) to easily access them from a drop down menu. I honestly don't even remember how I enabled that long ago. I'd love to be able to do something similarly for this scenario. Or even possibly a menu function, etc. Thanks.
 
Tried to run your script on Safari 15.4, but this is not working (anymore), nor do the plugins work. It is really frustrating because I read scientific papers and keep sometimes 2-300 tabs open to refer to, but loading each only happens when you click on that specific tab. This is really time consuming when you have to wait a few seconds for each page to reload (albeit, you can go to the next tab while the current one refreshes, but you get my point...)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.