You often need to reload all the tabs in the Safari Web Browser when you face any internet disconnection. When you have multiple tabs open on Safari, it is a hectic task to reload all the tabs individually. The older versions of Safari have the option to reload all the tabs that are open. It was a context menu option for the tab but the recent updates don’t provide this option by default.
Many of the users still need the functionality of reloading all the tabs. This can be done with a simple Apple Script.
Reloading all the Tabs in Safari
All you need is to open the Automator app on the macOS and click on the New Document button. Choose the Services option and open Service receives selected dropdown menu and choose No Input.
Now open In dropdown menu and choose Safari from the list of the applications. Select Run AppleScript from the library on the left.
An editor will open, paste the given script as a replacement to the default script.
tell application "Safari" set a to tabs of the front window repeat with x in a set docUrl to URL of x set URL of x to docUrl end repeat end tell
Save the service with a meaningful name and run the script on Safari.
Running a Script in Safari Browser
If you already have a script written for Safari, you can easily run it into Safari just by opening the Safari. Choose Preferences from Safari, select Advanced Settings and then Show Develop menu from the menu.
Safari > Preferences > Advanced > Show Develop menu
In the Develop menu of Safari, enable Allow JavaScripts from Apple Events
To run the service, in Safari menu under Services, find the service you previously created. Click the service to run it. This will reload all the tabs in Safari.
While using Chrome, all you need is to choose the tabs from the top and use the Reload Option in the context menu of Chrome.