Skip to content

find outwhich link on another page was clicked to get to current page?

Assuming I have two html pages. Let’s assume foo.html and bar.html. foo.html is linked twice to bar.html. One from a picture and the other from text content. If a user now clicks on one of the two links on the first page (foo.html) and thus gets to bar.html, can you find out in bar.html which link the user followed?


You could add a query string to the links, e.g.

then will contain '?picture' or '?text'