Saving Information For The Duration The User Has A Site open
<p>How woulld I set this up:</p>

<p>I wanna save what links a user clicks on in a website. I thought of creating a jquery function that would save the link name everytime a link is clicked , then ajax the info to the db after the user closes the site.</p>

<p>Does that sound like a proper way. Anyone have samples of that? </p>

<p>Since there are multiple pages with multpile links, I wanna create something equivalient to a Session variable in javascript so I can append info to it everytime a user clicks a link and send the info only once to the db, instead of everytime a user clicks a link open a db connection and send the info.</p>

<p>The links are products so I wanna save related products, so I wanna save related product infomation. Maybe I need a cookie instead?</p>
