#30997: Deprecate HttpRequest.is_ajax.
-------------------------------------+-------------------------------------
     Reporter:  Adam (Chainz)        |                    Owner:  nobody
  Johnson                            |
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  HTTP handling        |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * stage:  Unreviewed => Accepted


Old description:

> 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`.

New description:

 As discussed on [https://groups.google.com/d/msg/django-
 developers/F8F5b1kEA34/FhqCmRw9BwAJ this django-developers thread] 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#comment:1>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.8e3f2c29fca215b62c3d2498c0e27914%40djangoproject.com.

Reply via email to