Do You Really Want to Go Back?
This page demonstrates how a website can detect and display the URL a visitor came from using
the browser’s document.referrer
property. It shows the original page the user clicked from
and creates a dynamic “Go Back” link.
You can also copy the provided HTML snippet and test it in any website to see how referrers are passed.
How to Test This
- Click the button to copy the snippet below.
- Go to any website, press Ctrl + Shift + C to open developer tools.
- Pick any link, edit as HTML, and paste this code.
- When you click that link, it will bring you here.
- Clicking the button above will then take you back.
<a href="https://ayassin.dev/TakeMeBack" referrerpolicy="unsafe-url"> <h6>Direct me to TakeMeBack</h6> </a>