Classic ASP - setting cookies in addition to a session

I try to track user activity on my system until the session ends - if they request a page, the session is absent, but also their user information.

I have too many pages to pass any session identifier along the query line, so I thought that maybe in one of my best applications I can set a cookie that does not expire with the session and reset it every time I log in. So In this way, I can track users / pages.

Can this be done with session vars? How should I do it?

+3
source share
1 answer

cookie, , , .

cookie

Response.Cookies("TrackID") = 'Something'
Response.Cookies("TrackID").expires = DateAdd( "yyyy", 5, Date )

cookie

TrackID = Request.Cookies("TrackID")
+5