Question: So let's say I have a website which doesn't require login but I want to be able to track the user's activity based on what they click on my website, and display data accordingly. For example, if they keep looking at children's books to buy, I would recommend similar children's books. Is this possible in javascript?
The only solution I can come up with is cookies, is there a more efficient way?
Thank you.
I hope this is an acceptable question to post on here, as it is not code related

Answer: 
You could use HTML [local or session storage](https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API). These are both easier to use than cookies.
You can also use [Mod­ern­izr](http://theburningmonk.com/2010/12/having-fun-with-html5-local-storage-and-session-storage/) for browsers that do not support HTML5.
[html5 websockets](http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-websockets-today/) might be of help.