Making links 'visited' from the server end

Reply

Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

Making links 'visited' from the server end

 
0
  #1
Jan 21st, 2007
Forum software solutions have a way of indicating whether threads (and in the case of Daniweb forums to) have had their content viewed by a user.

How exactly is this done? Is reference to every page a user has explored stored somewhere, for every user (or for every page)? That seems like a huge amount of data potentially..

A solution I figured out was to write the modified date of a target file to a query string variable when rendering hyperlinks to that file; in most browsers, this makes links show as visited when a user has seen the target file but only if the target file hasn't been modified since the last time they saw it.

This is by no means ideal because a user might come on from a different computer or browser; and could think that they haven't followed any links...

I'm all for implementing detailed tracking per-authenticated user; but that means only authenticated users get the benefit of knowing when things are 'new'. Still; I suppose I could create a new guest account for every IP address.

Is there something I'm missing? I can see myself blowing my storage allowance on per-page user tracking O_o
Last edited by MattEvans; Jan 21st, 2007 at 11:55 am.
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,210
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: Making links 'visited' from the server end

 
0
  #2
Jan 22nd, 2007
The problem with your solution is that all users see the same file properties. But some users have followed the link, while others have not.

There are two ways to mark links as "visited"

- The browser can keep track of visits. This is the normal way of doing it. The browser has a list of visited links, and an adjustable time limit on the period of life for each link.

- This is what cookies are for. The website keeps a cookie on each user's browser. This can be as simple as noting the last time the user logged out, or as complicated as keeping a set of links to visited links.

The problem with both of these is that they don't work across different computers. In both cases, the information is saved on the user's computer. A database for this on a server with a large client base would be prohibitively huge.

One other possibility for keeping the user straight on multiple computers is to use a briefcase system, and put the browser's history and cookie files in the user's briefcase.
Last edited by MidiMagic; Jan 22nd, 2007 at 4:26 pm. Reason: more info
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

Re: Making links 'visited' from the server end

 
0
  #3
Jan 22nd, 2007
Ah, I should have been more specific there; it's not just important if a link has been visited; but also if data in and X virtual 'directories' below a current directory has been modified since a user last saw it.

I suppose cookies could work. I didn't really consider using them; I rate a site setting a new cookie more than a few times in a session as a large irrtatant (only because my browser's usually in a testing mode and asks me about every cookie a page tries to set).

I suppose (because my virtual directories are physical) that it would be quite alot simpler with cookies, good use of path/domain would mean much less need for classification at my end.. But indeed; it's not transferent between computers/browsers, and would generate a potentially huge amount of cookie data for my users...

My site uses a logging method already; at present every user has a file-vector into the folder representing their current location... I suppose it'd be simple (and fast per-request) to make those vectors leave persistant impressions. Limiting the persistance of information to the top X sublocations from a location would be ok aswell..

It seems quite a big planning task for something that on-the-face-of it seems simple.
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the IT Professionals' Lounge Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC