Added XHR check to JSON view