Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-26-2009, 11:26 PM   PM User | #1
masipay
New Coder

 
Join Date: Jan 2009
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
masipay is an unknown quantity at this point
Issues with Rating Script, cookies & ethics

While trying to write rating script I came across several methods and designs online. Logic pretty much same but diff implementation. Using Ajax is what I have chosen to do so but I have few questions that I couldnt' find the answers to.

Most scripts, found online, uses database with number of votes and total aggragate of vote values, to show the current rating of an item(image, or video or other items).

To use unique voting ie, not to allow same user to vote more than once on one item::simple and easy way is t set cookie on users machine. And here is the question: If an average user views 10 or more images/videos, you would set 10 or more cookies that would refer to each viewed item, in one week that is 70 or more cookies + how many days would you set the cookies for? After all this, cookies have to retire oneday, which implies the same user could stumble on the same item he/she voted 1 week ago or 2 weeks ago, since the cookie has expired he can vote again. All this implies that uniqueness of voiting or rating can not be established logically unless you set the cookies for ever.

Now I know there are many experts here in the forum and I would like to get suggestion on this issue. I personally am against setting unnecessary cookies on valued customers/users. What boils my mind is how youtube sets cookies on videos watched, videos rated. Is youtube setting these cookies for how long? If I am a youtube junky and watch 10 or more videos a day my computer is piled with youtube cookies.

I hope someone will kindly give me some insight on this. thanks
masipay is offline   Reply With Quote
Old 02-27-2009, 03:09 PM   PM User | #2
A1ien51
Senior Coder

 
A1ien51's Avatar
 
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
A1ien51 will become famous soon enough
The only real way to do it is to create a user login system and store if they voted or not in a db. By just making it cookie based, you will allow people to inflate your numbers really easily by disabling cookies.

Eric
__________________
Tech Author [Ajax In Action, JavaScript: Visual Blueprint]
A1ien51 is offline   Reply With Quote
Old 03-01-2009, 04:22 AM   PM User | #3
masipay
New Coder

 
Join Date: Jan 2009
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
masipay is an unknown quantity at this point
Quote:
Originally Posted by A1ien51 View Post
The only real way to do it is to create a user login system and store if they voted or not in a db. By just making it cookie based, you will allow people to inflate your numbers really easily by disabling cookies.

Eric
well, I am not concerned with the precision of the rating. Even if we store the ratings in the database it would take whole lot of space + question is how long would you keep the data in db? and same question is wit cookies, how long would you set the cookies for? In another way what is the simple and best way to go? (storing in the database is not my option, so i guess cookies>> but how long would you set the cookies for?


thanks
masipay is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:04 PM.


Advertisement
Log in to turn off these ads.