Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
const limit = 10;
let views = localStorage.getItem( 'numberOfVisits' );
if ( views === null ) {
views = 0;
}
if ( views >= limit ) {
localStorage.setItem( 'numberOfVisits', 0 );
window.location = '[cb:url location="login" /]';
} else {
views++;
localStorage.setItem( 'numberOfVisits', views );
}
Please Log in to join the conversation.