Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to maintain data in database regarding what visitors doing inside my website. i mean to say i have entertainment website first time user enters into my website,select images like flowers i just capture that information and store it in database.When same user open my website i need to display the images what he visited last time. i want to do this based on ip address of visitors. please guide how can i start this?
Posted
Updated 21-May-13 2:24am
v2
Comments
Joezer BH 21-May-13 8:26am    
What seems to be the problem?
Have you tried anything?

You can store the user's browsing data into browser cache with a key which can later be used to display the previously browsed data.


Many E-Commerce do this to populate collection's like: Recently Visited Product.

And also if you store the browsing history in your DB then its overhead for you to manage this, as same user may not return for forever also not every user uses static IP.

And you can see this in action in servlets on : http://www.topshop.com/[^]
 
Share this answer
 
You don't need to store any information on your server. Just create a cookie on client's PC. Check on page load if it exist or not. If it exist read the stored item from it and populate the items on page accordingly. If it does not, on searching the items create a new cookie. This is what suits more to your need.
 
Share this answer
 
Comments
User-10031173 22-May-13 3:00am    
thanks for reply. i ll try it.
User-10031173 22-May-13 6:13am    
just send me the steps for creating cookies , and how can i store it ,what i need to store in database regarding cookies

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900