How to remember a url for each visitors on your website?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
23 views
Technical neohodimo to remember url on which the client stopped while browsing the site, and the substitution of the standard url for the saved, revisited, but within the same site. After studying the issue I came to the conclusion that you can implement either using session or using cookies. With the session not clear because after you close your browser to work with the client will not work, and the cookies got a little lifespan. Someone faced with such a task?
by | 23 views

2 Answers

0 like 0 dislike
cookies can be set at any time. 1000 days in terms of the Internet - you can take it as FOREVER.
by
0 like 0 dislike
The browser of the visitor, in particular after the #

var location = window.location.href.split('#')[1]; localStorage.setItem('history',location); //window.localStorage.clear(); if (localStorage.getItem('history') === null) { document.getElementById("hidetext666").innerHTML ='Welcome! '; } else{ document.getElementById( 'result' ).innerHTML =localStorage.getItem('history'); };
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
4 answers
110,608 questions
257,187 answers
0 comments
40,796 users