Unfortunately, the WebView rendering engine of Android does not send a referer. There are a few hacks (like https://stackoverflow.com/questions/5342399/how-to-send-a-referer-request-in-a-url-for-a-webview), but unfortunately, they only work on specific Android versions and only for the first URL called. As a better way we suggest that you save the current URL in a cookie “last_visited”, which is overwritten or updated by every page (e.g., by PHP or JavaScript: https://stackoverflow.com/questions/17254189/how-to-save-current-url-to-a-cookie-and-restore-with-javascript-onclick). 🙂
- Knowledge Base
- WebViewGold for Android
- I noticed today that hyperlinks in my web app that call up other pages aren’t showing a HTTP Referrer in the HTTP header while using the generated Android app.
Article sections
Related Articles
- Can You Convert a Website to an App: Unlocking Mobile Potential for Your Business?
- How to Hide the Android App Links/"Deeplinking Not Configured Correctly" Warnings in Play Store for WebViewGold Users
- How to add Web Authentication (WebAuthn) Login Support to Android WebView-Based App?
- Firebase registration issue / "Invalid google_app_id. Provided id: xxxxxxxxx" error
- How to prevent Non-HTTPS connections in WebViewGold for Android? | Switching usesCleartextTraffic from 'true to 'false'
- How to resolve a "SDK Location Not Found" error in Android Studio?