944,081 Members | Top Members by Rank

Ad:
Jan 21st, 2007
0

Making links 'visited' from the server end

Expand Post »
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.
Similar Threads
Moderator
Featured Poster
Reputation Points: 522
Solved Threads: 64
Veteran Poster
MattEvans is offline Offline
1,091 posts
since Jul 2006
Jan 22nd, 2007
0

Re: Making links 'visited' from the server end

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
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Jan 22nd, 2007
0

Re: Making links 'visited' from the server end

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.
Moderator
Featured Poster
Reputation Points: 522
Solved Threads: 64
Veteran Poster
MattEvans is offline Offline
1,091 posts
since Jul 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in IT Professionals' Lounge Forum Timeline: Anonymity in the digital age
Next Thread in IT Professionals' Lounge Forum Timeline: Could Power Supply Be My Problem?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC