I want to save the page url, to a log file for example, that a user browses during a session and suggest him/her next time. What’s the best scenario?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The correct scenario is to connect the user cookie with his data on a database on server and there keep the last visiting page.
An alternative for a site with few pages (and not database), is to have a number for each of your page and save this number only on the cookie, and then know what page to show base on this page number. Eg the 56 is for page contact.aspx
So the next time it will visit your page you find that parameter and make your suggestion.
To save the full url page on the cookie is something that I do not suggest because you make the cookie too big in size and that can lead to other problems (think that all cookies are follow the user on all calls, even the calls to see an image).
Of course you need to make this suggestions only for new sessions – and if the user is not on the same page. Think also what happens if a user have open 10 pages of your site opens and the session ends on all after some time of inactivity… Think again the user interface, the common way for that is the full history of what he see at the end of the page.