There is a web app which runs in a standalone mode with the following manifest.json
{
"lang": "de",
"name": "Test.App",
"short_name": "Test.App",
"start_url": "/36485/",
"display": "standalone",
"theme_color": "#FF4500",
"background_color": "#FFFFFF",
"icons": [...]
}
There is no browser UI in this mode, so opening documents (like pdfs, docs, etc) must be done in a new Safari Window. Which brings me to the question: how do I force Safari to open a new browser window? The solution we have found now is to give it a different domain name(!!), ie. a subdomain. Every other option - be it window.open
or taget=_blank
- had no effect whatsoever and all the links would open in the same standalone window thus making it impossible to go back to the actuall app interface. External domain seems to do the trick. Is there any workaround to avoid using a subdomain? Maybe via some definitions in the manifest?
link_element.onclick = function() { window.open(this.href.replace('https://', 'http://'), '_blank'); return false; }
– Coacher