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
- How to Fix the Android Studio Error: “The project is using an incompatible version (AGP X.X.X) of the Android Gradle plugin”?
- Key Metrics to Track in Your iOS & Android Apps and What They Reveal
- Monetizing Your App: Strategies for Generating Revenue
- Security and Privacy: Protecting Your Users' Data in Mobile Apps
- Solving the “Writable dex file is not allowed” Crash in Android Apps
- Google Play Target API Level 34 Requirement: What Developers Need to Know