How to implement correctly this code. Code is for keep track of the web pages visited, so you can back-reference to the last page the user has browsed to
The code to impl