Need to check more than the pathname.  Adding hostname check, since HTML5 pushstate only works on the same hostname.  Links to other domains will now work.