Welcome to WebmasterWorld Guest from 54.159.250.110

Forum Moderators: open

Message Too Old, No Replies

Help on, what time user entered site

Help on, what time user entered site

   
6:45 pm on Mar 4, 2012 (gmt 0)



Hi,

I was wondering if there is a Javascript or other, that will show at what time a user entered a site? E.g. You entered this page at 10:30 am

Will I need something that writes to a temporary file or can this be recorded locally?
7:24 pm on Mar 4, 2012 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



You could store it in a cookie on the user's browser, or in a database table in the server.

Depends whether you mean "site" or "page" too.
10:47 pm on Mar 4, 2012 (gmt 0)



I rather as a cookie, as I do not have a database. I could "flatfile" it though. Just some text that would show somewhere on a page saying "You entered (or visited) this page at (for example) 10:30 am". There is a 1 hour cookie set in a protected page and just want that person to know what time he/she entered the page.
5:06 pm on Mar 5, 2012 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



You may already know this, but Javascript is executed client side. So if you're on the west coast, a New York client enters your site at 10 AM PST, you may wonder how that's possible when it's 7 AM your time. The best way to do that would be server side, unless it's just a point of reference for the visitors (which it sounds like it is.)
7:20 pm on Mar 5, 2012 (gmt 0)



Yes, it's just a point of reference.