Ticket #13755: 13755.diff

File 13755.diff, 844 bytes (added by Tim Graham, 10 years ago)
  • docs/ref/request-response.txt

    diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
    index 8e42fa1..61140d0 100644
    a b Methods  
    314314    If you write your own XMLHttpRequest call (on the browser side), you'll
    315315    have to set this header manually if you want ``is_ajax()`` to work.
    316316
     317    If a response varies on whether or not it's requested via AJAX and you are
     318    using some form of caching like Django's :mod:`cache middleware
     319    <django.middleware.cache>`, you should decorate the view with
     320    :func:`vary_on_headers('HTTP_X_REQUESTED_WITH')
     321    <django.views.decorators.vary.vary_on_headers>` so that the responses are
     322    properly cached.
     323
    317324.. method:: HttpRequest.read(size=None)
    318325.. method:: HttpRequest.readline()
    319326.. method:: HttpRequest.readlines()
Back to Top