I needed to have a set up where if my server detected an AJAX request, it would respond with only a part of a webpage, but otherwise it responded with the full page. I went with the solution posted
here (third one down, by Andrew Theken). Is this a hack or an intended use of the language? Will there be a performance hit by doing this?