#30997: Deprecate HttpRequest.is_ajax
-------------------------------------------------+------------------------
               Reporter:  Adam (Chainz) Johnson  |          Owner:  nobody
                   Type:  Cleanup/optimization   |         Status:  new
              Component:  HTTP handling          |        Version:  master
               Severity:  Normal                 |       Keywords:
           Triage Stage:  Unreviewed             |      Has patch:  0
    Needs documentation:  0                      |    Needs tests:  0
Patch needs improvement:  0                      |  Easy pickings:  0
                  UI/UX:  0                      |
-------------------------------------------------+------------------------
 As discussed on [this django-developers
 thread](https://groups.google.com/d/msg/django-
 developers/F8F5b1kEA34/FhqCmRw9BwAJ) this should be deprecated.

 It inspects the non-standard header X-Requested-Wiith that is set by
 jQuery and maybe other frameworks. However jQuery's popularity, especially
 for making requests, is decreasing thanks to changes such as the new
 `fetch()` JS API.

 Also in the cases this property is used to determine the kind of content
 to send to a client, it'd be better to inspect the HTTP standard `Accept`
 header.

 For these reasons Flask has deprecated its similar property `is_xhr`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30997>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.d7595b582b3aeeb677f5bf062ea457f8%40djangoproject.com.

Reply via email to