homepage Welcome to WebmasterWorld Guest from 54.226.192.202
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Help on, what time user entered site
Help on, what time user entered site
fredfletcher



 
Msg#: 4424759 posted 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?

 

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4424759 posted 7:24 pm on Mar 4, 2012 (gmt 0)

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.

fredfletcher



 
Msg#: 4424759 posted 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.

rocknbil

WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4424759 posted 5:06 pm on Mar 5, 2012 (gmt 0)

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.)

fredfletcher



 
Msg#: 4424759 posted 7:20 pm on Mar 5, 2012 (gmt 0)

Yes, it's just a point of reference.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved