I use my PHP backend to detect Ajax like this: $_SERVER['HTTP_X_REQUESTED_WITH']. This gives me a reliable detection, making sure the request is Ajaxed.
How can I make sure the request came from my own domain, and not an external domain/robot?
www.example.com/ajax?true could allow anyone to make an Ajax call and cut the information.
I could make sessions for everyone that enters my website normally, and then allow Ajax calls.. but that can be faked too.
Does it even matter, in these days?