a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment
Kaius  ·  4054 days ago  ·  link  ·    ·  parent  ·  post: A Big Family, at the Beach

mk would probably need to implement URL normalization and comparison. As you say if you compare the 2 urls we submitted they only differ by the querystring parameters: http://www.newyorker.com/reporting/2013/10/28/131028fa_fact_... http://www.newyorker.com/reporting/2013/10/28/131028fa_fact_...

A piece of c# code that might be a good start would be:

  int endIndex = url.IndexOf("?");
  if(url.indexOf("#") > -1 && url.IndexOf("#") < endIndex) // catch those inpage bookmarks.
      endIndex = url.IndexOf("#");
  
  string urlToCompare = url.SubString(0,endIndex).ToLower();  //search db for this
Actually I'm pretty sure the Framework has way of comparing URI's which would work better than this.

God know what the lisp equivalent is...