When I am developing a project on my local machine I normally have ColdFusion's request debugging output turned on so that I can see everything that is going on in the background. In particular I find this useful for identifying when queries are being run too often or are taking too long.
However this can be a problem when dealing with ajax requests as CF does not know not to include its debugging data in the returned request. At best this means you get too much information in any html served via ajax, at worst it breaks any ajax call that expects pure json in the response.
Fortunately there is a simple solution to this problem if like me (and most of the internet) you use JQuery. When making an ajax request JQuery adds a "X-Requested-With" header that we can watch for. If it is present and has a value of "XMLHttpRequest" then we can blocking the debugging output for that single request.
To do this I include this code block either in onRequestStart or in the case of FW/1 the setupRequest function.