Prevent massive amounts of site AJAX errors via search

I'm seeing loads of AJAX errors that only occur when *not* coming from search, and I think the fix is as simple as this.  We don't need this AJAX request if no referrer, right Janis?