/    Sign up×
Community /Pin to ProfileBookmark

When was a users last activity?

Is there a JavaScript code that allows you to check when a user’s last activity was?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@equazcionApr 07.2007 — How are you identifying users? You mean by their IP address? If so I would just look at the site's activity log, it's all there. If you need to run javascript code that depends on that information, I'm not sure if it's possible, since javascript is client-side, and this would really be a server-side operation. At least as far as I can tell. I think you would need PHP or ASP to do something like that.

Edit: Maybe you just mean that if a client has your site loaded but has been inactive for a certain amount of time then something should happen in javascript. You could use cookies for that, but unfortunately I know absolutely nothing about cookies with javascript. I use PHP for that stuff. Maybe someone else can help with this.
×

Success!

Help @Garath531 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...