· 2 min read
Safari app extensions vs Safari web extensions
When Safari's web extension API doesn't support what you need, the older app extension framework might be the answer.

When I started building TabBack for Safari, I chose Safari web extensions. It’s the newer framework and follows the WebExtensions standard. Even though I wasn’t planning to support other browsers, it felt like the right choice for a modern extension.
Safari web extensions
Safari web extensions are built primarily on JavaScript, HTML, and CSS, using the same standard as Chrome, Firefox, and Edge. You distribute them through the App Store as part of a macOS, iOS, or visionOS app.
A Safari web extension has three parts:
- A macOS or iOS app that can have a user interface
- JavaScript code and web files that work in the browser
- A native app extension that mediates between the app and JavaScript
These parts run in separate environments and communicate through messaging APIs. You can share data between the macOS or iOS app and the native app extension using app groups.
For TabBack’s first three versions, this worked well:
- Version 1: Basic back-to-last-tab switching with preconfigured shortcuts (Safari didn’t support extension’s shortcut customization until macOS 26 Tahoe)
- Version 2: Custom shortcuts through communication between the container app and the extension
- Version 3: Multi-level tab history navigation
But when users requested tab previews, I needed functionality that Safari’s web extension APIs didn’t provide. The tabs.captureTab API would have been ideal, but Safari doesn’t support it. The tabs.captureVisibleTab() is supported by Safari 14 or later, but it only captures the image of the active tab.
Safari app extensions
Safari app extensions use a combination of JavaScript, CSS, and native code written in Swift or Objective-C. Unlike web extensions, they’re built on the standard macOS app extension model and can only run on Mac (with Mac or Mac Catalyst apps). This is an older framework that Apple introduced before Safari web extensions existed.
The key advantage is access to native macOS APIs and capabilities beyond what the WebExtensions standard provides. For example, TabBack version 4 uses SFSafariPage.getScreenshotOfVisibleArea() to capture screenshots.
The trade-off is that Safari app extensions are Mac-only and don’t follow the WebExtensions standard. You can’t easily port them to other browsers or iOS. But when Safari’s web extension APIs don’t support what you need, app extensions give you direct access to native macOS capabilities.