Goto documentation
Overview
"goto" will forward a visitor to Magazin, preserving path and query parameters.
Use case
This services helps us to leave App when clicking on a Magazin link.
If link is "goto-ified" – hostname is goto.republik.ch instead of www.republik.ch (opens in a new tab) –, it will open in browser and forward to Magazin.
Examples
Republik-Link within App
<a href="https://www.republik.ch/angebote" target="_blank">
Angebote
</a>
On click will open /angebot inside app.
Goto-Link within App
<a href="https://goto.republik.ch/angebote" target="_blank">
Angebote
</a>
On click will open browser and forward user to https://www.republik.ch/angebote (opens in a new tab).
Caveats
iOS Behaviour
If link is clicked in iOS outside of App or browser – e.g. mail client –, and hostname is registered to open in app (see Linking), it will instantly open app hereafter.
To prevent this from happening, you might want to exclude path in .well-known/apple-app-site-association (opens in a new tab).
Android Behaviour using Location
HTTP Header
Some hostnames maybe registered to open in app (see Linking). A server-side redirect aka. Location
HTTP header may indicated to Android to open app.
To prevent this from happening, we use window.location.replace
(opens in a new tab).
It won't save goto-link in browser session history.