1

I am new to AJAX and django.

I have written my own XMLHttpRequest call on browser side. I will have to manually set the header request.META['HTTP_X_REQUESTED_WITH'] to string XMLHttpRequest.

How can I access these headers on browser side?

3 Answers 3

3

Use HttpRequest.is_ajax(). See the docs.

Sign up to request clarification or add additional context in comments.

Comments

0

Some post about django and ajax: Django AJAX Tutorial Part 1 - adding email to newsletter

Comments

0

If you want an easy to use solution for impolementing ajax ni django, I would recommend dajax i am using it in my own project and it simplifies things a lot.

of cause you wont be able to customize it as much as with your own programming but especially for beginners its pretty useful

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.