There are multiple ways to go about this.
(Also, do some research, please).
1.
if(window.localStorage){
if(window.location == '/pages/professionals-only'){
if(window.localStorage.getItem('visited') == true){
//they have already visited the page. Do something here
}else{
window.localStorage.setItem('visited',true)
}
}
}
read about local storage
Way 2.
if(window.sessionStorage){
if(window.location == '/pages/professionals-only'){
if(window.sessionStorage.getItem('visited') == true){
//they have already visited the page. Do something here
}else{
window.sessionStorage.setItem('visited',true)
}
}
}
read about sessionStorage
Way 3.
if(window.location == '/pages/professionals-only'){
if(document.cookie.split('=')[1] == 'true'){
//they have already visited the page. Do something here
}else{
document.cookie = 'visited=true';
}
}
read about cookies
Hope this is what you were looking for. If it is not, please comment.
You can also create simple login systems using this technique. Such as window.sessionStorage.setItem('username','bob');
and window.sessionStorage.getItem('username')