Currently, I am working on creating a registration form which will direct users to a "Thank you" page once completed. However, I want to include a button on this confirmation page that will take users back to the previous page they were on before registering.
The challenge is that my client requires that this functionality be achieved using only HTML5 and JavaScript on the front-end.
Given these specific requirements, what would be the most effective method for generating a link that directs the user back to the page they were on two pages ago?