pravin
pravin

Reputation: 2155

How do I get users information using javascript/jquery - session/cookies/etc

I'm working on one web application, I dont have through idea about how to get users information like Session's data, cookies , and others..

I want to know :

Your suggestion(s) are welcome!!!

Thanks in advance.

Upvotes: 0

Views: 1069

Answers (1)

Ollie Edwards
Ollie Edwards

Reputation: 14729

Reading cookies from javascript is slightly trickier then it should be as it involves slicing up the long cookie string. It's still fairly trivial but I'd recommend you use an existing library to abstract these details away.

http://plugins.jquery.com/project/cookie if you're using jQuery or http://www.quirksmode.org/js/cookies.html#script for vanilla

Upvotes: 2

Related Questions