Say I am on a website viewing the homepage at https://whateverxyz.com/index
. Then I either
https://whateverxyz.com/app1.html
https://whateverxyz.com/app1.html
Can the server tell the difference between whether request was from A
or B
? Can client-side JavaScript running on app1.html
tell the difference?
Citate from your question:
- Can the server tell the difference between whether request was from A or B?
- Can client-side JavaScript running on app1.html tell the difference?
In both cases this is not possible to detect the difference.
What say us official resources?
Citate from RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1)
If the target URI was obtained from a source that does not have its own URI (e.g., input from the user keyboard, or an entry within the user's bookmarks/favorites), the user agent MUST either exclude the Referer field or send it with a value of "about:blank".
The Referer field has the potential to reveal information about the request context or browsing history of the user, which is a privacy concern if the referring resource's identifier reveals personal information (such as an account name) or a resource that is supposed to be confidential (such as behind a firewall or internal to a secured service). Most general-purpose user agents do not send the Referer header field when the referring resource is a local "file" or "data" URI. A user agent MUST NOT send a Referer header field in an unsecured HTTP request if the referring page was received with a secure protocol. See Section 9.4 for additional security considerations.
Read more about it:
Alternative solution
But something you could do on client side. In the page https://whateverxyz.com/index
you could write one listener in JavaScript which detect all clicks on this page links. And on click event you could write the link URL and the time in a cookie
, an IndexedDB
or a localStorage
. Then in the page https://whateverxyz.com/app1.html
you have to read this information. In the case if this information is not undefined it is from link and in all other cases it is from bookmark (or may be it was tipped in adress bar, or whatever).
See related questions:
I am afraid, you can not find out! It is only accessible in browsers extensions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With