Use JsonResponse instead of tweaking with the http header. And provide support for jsonp