Reply
Files modified since the surfer's last visit
Old 06-12-2005, 09:25 PM Files modified since the surfer's last visit
Novice Talker

Posts: 11
Assume for a minute I have a website of 10 pages, and each page displays a navigation frame/layer that allows the surfer to go to any of the other 9 pages on the site.

I am trying to put an "updated" indicator next to each item in my navigation bar for each webpage that has been updated since the surfer's last visit to that webpage. I put a cookie on the surfer's client (PC) whenever he/she visits a page on my site. Theoretically, they will end up with 10 cookies, one for each page. Each cookie contains a timestamp of their last visit to that cookie's related page.

The next time they visit my site (any page of my site), I want the navigation bar to indicate which pages have been updated since their last visit to my site.

I can set the cookie using javascript on the client side (assuming scripting and cookies are enabled). So, the cookie will contain a timestamp of the local time on the client.

I can use ASP to pass down from the server the last modified date of each of the 10 pages on my site (using filesys.GetFile(fileName) DateLastModified). And then theoretically, I can compare the the client-side cookie values with the server-supplied "last modified dates" to see which pages should be marked "updated". (Of course, I have to be aware that a javascript timestamp is in a different format from the UNIX server's filesys timestamp, so I have to do some manipulations in order to be able to compare the two.)

However, I discovered that the server is in a different time zone. So, now depending on where I am in the world, my timestamp can be off 1-23 hours.

I even tried passing the ASP Now() value {converted using the function DateDiff("s", "01/01/1970 00:00:00", Now())} down from the server to be used in the cookie timestamp, expecting that now I was comparing apples to apples (given both timestamps came from the server and expecting the time zones to match). However, I found yet another timezone issue. I'm not familiar with how timezones are managed, but the filesys timestamp I receive for the files last modified times are off from my personal timezone by 3 hours. What is weird is that the DateDiff() timestamp is off by 7 hours. Help!!!

Anyone else tackled this problem and have a solution? It you have a solution that works (or can point me to one), I'm happy to abandon my approach.

My web host is a UNIX box running Apache web server.

Thx.
justjackOH is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 06-13-2005, 01:03 AM
Novice Talker

Posts: 11
thx to all who read my reply, but I got it figured out.
So, Nevermind. ;-)
justjackOH is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Files modified since the surfer's last visit
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.67200 seconds with 12 queries