<< June 2008 | Home | August 2008 >>

JQuery Tip: Recognizing AJAX Requests on the Server

I discovered an interesting gem today while inspecting the header data for a web application I am working on. When you use JQuery to send an AJAX request to the server, JQuery places a nice little header entry:

X-Requested-With : XMLHttpRequest

Before, I would typically just stick something in the request params to signify an AJAX request. This is not life changing or anything by any means but it sure was nice of the JQuery folks to do this for me. Now I don't have to do it myself.