hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Reddit Recently Viewed Links
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

Reddit Recently Viewed Links

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 01-17-2011, 06:43 PM
GregVernon GregVernon is offline
Web Hosting Evangelist
 
Join Date: Sep 2008
Location: New York, US
Posts: 467

Reddit Recently Viewed Links


I've been curious about this for awhile, but how does the Recently Viewed Links section work?

I figure it must be a jquery action that tracks when a link is clicked. Does anyone know more of the programming behind this? i.e. making sure the new page isn't loaded before the tracking has occurred?

Thanks!

__________________
Brook Hollow Brands
HostLaunch - Web Hosting Directory & Marketplace
Web Hosting Directory - Find Web Hosting - Add Your Host

Reply With Quote


Sponsored Links
  #2  
Old 01-17-2011, 09:47 PM
che09 che09 is offline
Web Hosting Guru
 
Join Date: Jan 2011
Posts: 291
I've heard a lot of feed back about this. Though,more on the negative side. I think Reddit,has a sensible reason on putting this Recently Viewed Links,thus they might have implemented it too soon.

As far as I've read they are doing something to put an option on turning it off!

Reply With Quote
  #3  
Old 01-24-2011, 05:27 PM
jstanden jstanden is offline
Web Hosting Evangelist
 
Join Date: Aug 2001
Location: Orange County, CA
Posts: 532
You can inspect their Javascript and cookies with the Chrome Developer Tools or Firebug for Firefox.

It looks like they're adding an "onclick" event to links, which stores the recent history in the "<username>_recentclicks2" cookie as '%' delimited story IDs.

If you add an "onclick" event to a link it will fire before the browser changes the page, in the same way an "onsubmit" will fire before a FORM submits.

Code:
<a href="http://google.com" onclick="alert('You clicked me.  Now redirecting you!');">Click me</a>
The same is true of click events that you bind using jQuery.

__________________
Jeff Standen, Chief of R&D, WebGroup Media LLC. - LinkedIn
Cerberus Helpdesk 5.x (Cerb5) is a CRM toolkit. Remember anything about anybody, swiftly reply to a flood of e-mail,
capture feedback organically, track time, flag opportunities, share tasks, and more. http://www.cerberusweb.com/

Reply With Quote
Sponsored Links
  #4  
Old 01-24-2011, 05:35 PM
Harzem Harzem is offline
Community Liaison
 
Join Date: Feb 2006
Location: Istanbul, Turkey
Posts: 3,090
Code:
<a href="http://google.com" onclick="this.href = 'http://track.me/tracker.php?redirect-to=' + this.href">Click me</a>
This will override the current link, send it to the tracker, so the tracker can redirect the user.

__________________
Fraud Record - Stop Fraud Clients, Report Abusive Customers.
█ Combine your efforts to fight misbehaving clients.

HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
█ Large and awesome portfolio, just visit and see!


Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
How America is Viewed Elsewhere? Mike - Limestone Web Hosting Lounge 46 09-30-2010 12:42 PM
How your portal or blog can weather a digg / slashdot / reddit / etc effect UNIXy Web Hosting 0 08-12-2010 01:02 AM
Manipulated "viewed" links in browsers cisco_s Programming Discussion 4 01-04-2003 06:55 PM

Related posts from TheWhir.com
Title Type Date Posted
US Congresswoman Taps Reddit Community for Crowdsourced Domain Seizure Proposal Web Hosting News 2012-11-20 10:56:59
Web Host Gandi Emphasizes User Customization with Interface Updates Web Hosting News 2012-10-23 16:14:19
Web Host Gandi Provides Domain Management Service to Social News Site Reddit Web Hosting News 2012-10-03 13:26:09
How the President Crashed Reddit, and How Hosts Can Help Customers Handle Traffic Spikes Web Hosting News 2012-09-10 13:48:50
WordPress, Tucows Among Sites Going Dark for SOPA and PIPA Protest Web Hosting News 2012-10-17 16:18:37


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?