Works only in iOS 17, I couldn't find a way to do it in earlier versions of iOS.

window.location = `x-safari-${window.location.href}`;

So the URL should look like x-safari-https://domain

It looks like the in-app browser also blocks the second attempt (if a user clicks 'don't open safari' the first time), so rendering a link with this URL instead might be a better solution.

Answer from Victor Trusov on Stack Overflow
Top answer
1 of 9
6

Works only in iOS 17, I couldn't find a way to do it in earlier versions of iOS.

window.location = `x-safari-${window.location.href}`;

So the URL should look like x-safari-https://domain

It looks like the in-app browser also blocks the second attempt (if a user clicks 'don't open safari' the first time), so rendering a link with this URL instead might be a better solution.

2 of 9
4

It's a bit hard to answer this question (and all the comments) as the use case isn't overly clear, but here goes...

On mobile devices, an "in-app browser" is NOT the same thing as a Progressive Web App running in full-screen mode.

If an iOS app runs and then displays HTML content inside of it, it's utilizing UIWebView or WKWebView. However, in the case of a PWA it's already running in Safari as a "full screen" experience. Defining which you're trying to break links out of is extremely important as they function differently.

target="_blank" will typically break a link out of a page using WebView. I believe this is the default functionality for links outside the current domain as well.

An "installed" PWA is running in something called "Stand Alone" mode. This makes it full screen and removes navbars, etc. As of this writing, Safari doesn't support the fullscreen API that other browsers are implementing. Chrome uses the App manifest file to determine this functionality. Safari basically ignores the manifest in favor of proprietary meta tags.

In this case <meta name="apple-mobile-web-app-capable" content="yes"> tells Apple to make the page a stand-alone app. Try setting content="no" (Safari caches things heavily so you might need to force a refresh) on the pages that should break out of stand-alone mode. You can check to see what mode the page thinks it's in by using this javascript boolean window.navigator.standalone.

Or you can use javascript to force a "new window" in Safari as long as you're targeting a different subdomain or HTTP instead of HTTPS.

// if app is hosted from https://example.com
if (("standalone" in window.navigator) || window.navigator.standalone ) {
    window.open('http://example.com/page', '_blank');
}

Finally, Apple uses some special URL strings to cause native apps to handle some actions like emails, phone numbers, and youtube videos. You might be able to "hack" that functionality to get safari to open your link.

Discussions

PWA on iOS
Well, for Angular you can use Ionic to make a real app. I'm sure there's something similar to just build it as a regular app someone can install from a store or side load. More on reddit.com
🌐 r/reactjs
30
22
March 18, 2024
Safari iOS Extensions in PWAs? Any trick to getting them to be functional?
My understanding is that the installed PWAs / installed web apps do not run in the same context as Safari. There is no fix for this. We ( Open Web Advocacy ) are pushing hard for Web Apps to be "controlled/managed" by the browser that installed them. That means once we're successful you'll be able to use another browser to install the Web App, and use that browsers extension support. We have a long road ahead to get there, but we're making good progress. More on reddit.com
🌐 r/PWA
4
4
January 23, 2024
Why is a Progressive Web App (PWA) not do… - Apple Community
Lots of other people are having ... of iOS 14. The consistent reply from the Google experts is that "this is most likely a safari / ipad os 14.x issue." Is Apple addressing this problem? 1102 2 ... Try a restart. ... Try a forced restart. ... Have you tried going to the App Store and downloading the app? I just checked and it is there. ... I am referring to a PWA, not an App ... More on discussions.apple.com
🌐 discussions.apple.com
PWA showing white screen on IOS 16.4 when… - Apple Community
After IOS 16.4 update, PWA stops working on Safari. It works when Content Restrictions is disabled, but for some users even this is not working. This is probably a new Safari bug and reported by users on stackoverflow and twitter. More on discussions.apple.com
🌐 discussions.apple.com
🌐
Firt
firt.dev › notes › pwa-ios
iOS PWA Compatibility - firt.dev
June 6, 2023 - This is a compatibility list of supported features on Safari on iOS and iPadOS vs. what's available in the most used PWA browser in current market share for similar mobile devices: Google Chrome on Android.
🌐
Netguru
netguru.com › home page › blog › 6 tips to make your ios pwa feel like a native app
6 Tips To Make Your iOS PWA Feel Like a Native App
December 31, 2024 - Unfortunately, there's no such thing on iPhone, so our visitor is not even aware of our app's capabilities. Moreover, as much as 3 taps are required on iOS to add an app to the home screen.
🌐
web.dev
web.dev › learn › pwa › installation
Installation | web.dev
A browser prompt to install your PWA doesn't exist On iOS and iPadOS. On these platforms PWAs are also known as home screen web apps. These apps have to be added manually to the home screen via a browser share menu.
🌐
Brainhub
brainhub.eu › library › pwa-on-ios
PWA on iOS - Current Status & Limitations for Users [2025]
While they still face certain limitations on iOS compared to Android, recent updates have brought improvements. ... Although Safari doesn't provide an automatic installation prompt, users can still add PWAs to their home screen.
🌐
Next.js
nextjs.org › docs › app › guides › progressive-web-apps
Guides: PWAs | Next.js
August 21, 2025 - You can provide a custom installation button with beforeinstallprompt, however, we do not recommend this as it is not cross browser and platform (does not work on Safari iOS). To ensure you can view notifications locally, ensure that: ... Security is a crucial aspect of any web application, especially for PWAs.
Find elsewhere
🌐
Medium
medium.com › @firt › iphone-11-ipados-and-ios-13-for-pwas-and-web-development-5d5d9071cc49
iPhone 11, iPadOS and iOS 13 for PWAs and web development | by Maximiliano Firtman (firt.dev) | Medium
August 18, 2020 - Progressive Web Apps in standalone mode are now remotely inspectable in Safari, which is good news! Separating the contexts from a Service Worker and the actual PWA client is still a challenge, but it’s good to have inspection back.
🌐
Scandiweb
scandiweb.com › home › collection › pwa ios strategies for unbeatable mobile performance!
iPhone iOS PWA Strategies for Unbeatable Mobile Performance
June 3, 2025 - PWAs on iOS can be manually added to the home screen through Safari, but developers must simplify this process for users and provide clear instructions to improve installation consistency and visibility on the device.
🌐
DockYard
dockyard.com › blog › 2017 › 07 › 13 › safari-ios-and-progressive-web-apps
Safari, iOS, and Progressive Web Apps: What You Should Know - DockYard
July 13, 2017 - Sadly, no. Browsers like Chrome that do readily support all aspects of PWAs are really only re-skinned versions of Safari on iOS devices.
🌐
Pwa
pwa.io › articles › web-push-with-ios-safari-16-4-made-easy
Web Push with Mobile Safari (iOS 16.4) made easy - pwa.io
pwa.io · iOS 16.4 finally supports Push Notifications. Here is how to use them. Since a few weeks the mobile Safari now supports Push Notifications.
🌐
Reddit
reddit.com › r/pwa › safari ios extensions in pwas? any trick to getting them to be functional?
r/PWA on Reddit: Safari iOS Extensions in PWAs? Any trick to getting them to be functional?
January 23, 2024 -

I found a previous thread talking about Safari Extensions in PWAs and the feedback seemed to centre around Ad Blocking, which isn’t really what I’m interested in. I’m currently building a radio scrobbling app and wanted to leverage the Web Scrobbler extension to handle the authentication and scrobbling. It works beautifully in Safari, but when I add the PWA to my homescreen it doesn’t do anything. I wasn’t sure if anyone had any insight on how extensions could function within a PWA and whether there’s some secret sauce to doing it. I contribute to Web Scrobbler, so feel like if I had some direction to offer on the topic I could see about asking about getting that compatibility included.

🌐
CDC
cdc.gov › niosh › mining › tools › installpwa.html
How to Install a PWA | Mining | CDC
January 2, 2025 - A PWA can only be installed on iOS using the Safari web browser. First, navigate to the site in Safari. Press the "Share" button and select "Add to Home Screen" from the popup. Lastly, tap "Add" in the top right corner to finish installing the PWA.
🌐
Vinova Pte. Ltd.
vinova.sg › navigating-safari-ios-pwa-limitations
Navigating Safari/iOS PWA Limitations and Bugs: Essential Tips and Tricks - Top Mobile App Development Company in Singapore | Vinova SG
August 15, 2025 - Data Eviction: iOS can automatically clear PWA storage (Cache, IndexedDB) if the app isn’t used for a few weeks. A 7-day cap on script-writable storage also exists, potentially clearing data sooner if the PWA isn’t frequently accessed. No Shared Storage: Data saved in Safari isn’t shared with the installed PWA instance, complicating some user flows.
🌐
MagicBell
magicbell.com › blog › essential-pwa-strategies-for-enhanced-ios-performance
4 Essential PWA Strategies for Enhanced iOS Performance
1 month ago - They can still cache content and ... using Firebase. Supporting PWAs on iOS is further impacted by Safari's limitations, which can restrict access to certain APIs and reduce overall PWA performance....
🌐
Apple Community
discussions.apple.com › thread › 250145661
Why is a Progressive Web App (PWA) not do… - Apple Community
Lots of other people are having this problem since updating to any version of iOS 14. The consistent reply from the Google experts is that "this is most likely a safari / ipad os 14.x issue." Is Apple addressing this problem? 1102 2 ... Try a restart. ... Try a forced restart. ... Have you tried going to the App Store and downloading the app? I just checked and it is there. ... I am referring to a PWA, not an App Store App.
🌐
web.dev
web.dev › learn › pwa › progressive-web-apps
Progressive Web Apps | web.dev
September 20, 2024 - While Apple has never used the term PWA in public, they've been supporting the technologies to make a PWA installable and offline-capable since 2018 on Safari for iPhones and iPads.
🌐
Apple Community
discussions.apple.com › thread › 254817781
PWA showing white screen on IOS 16.4 when… - Apple Community
After IOS 16.4 update, PWA stops working on Safari. It works when Content Restrictions is disabled, but for some users even this is not working. This is probably a new Safari bug and reported by users on stackoverflow and twitter.