AYassin

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.

Go Back

How to Test This

  1. Click the button to copy the snippet below.
  2. Go to any website, press Ctrl + Shift + C to open developer tools.
  3. Pick any link, edit as HTML, and paste this code.
  4. When you click that link, it will bring you here.
  5. Clicking the button above will then take you back.
An unhandled error has occurred. Reload 🗙