Which browsers don't support a HTTP DELETE with jQuery.ajax? [duplicate]

Active3 hr before
Viewed126 times

7 Answers


Description: Get the children of each element in the set of matched elements, including text and comment nodes.,As of jQuery 3.2, .contents() returns contents of <template> elements as well.,Consider a simple <div> with a number of text nodes, each of which is separated by two line break elements (<br>):,Properties of the Global jQuery Object

<div class="container"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br><br> Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br><br> Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</div>
load more v

In order to understand Ajax, you must first understand what a web browser does normally.,Note the data-remote="true". Now, the form will be submitted by Ajax rather than by the browser's normal submit mechanism.,Notice the format.js in the respond_to block: that allows the controller to respond to your Ajax request. You then have a corresponding app/views/users/create.js.erb view file that generates the actual JavaScript code that will be sent and executed on the client side.,However, because Turbolinks overrides the normal page loading process, the event that this relies upon will not be fired. If you have code that looks like this, you must change your code to do this instead:

   .then((data) => data.text())
   .then((html) => {
      const results = document.querySelector("#results");
      results.insertAdjacentHTML("beforeend", data);
load more v

Create an object store in the database.,We can create another object store with the key generator as below:,Setting up an autoIncrement flag when creating the object store would enable the key generator for that object store. By default this flag is not set.,Beware that implementations that use a prefix may be buggy, or incomplete, or following an old version of the specification. Therefore, it is not recommended to use it in production code. It may be preferable to not support a browser than to claim to support it and fail:

// In the following line, you should include the prefixes of implementations you want to test.
window.indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
// DON'T use "var indexedDB = ..." if you're not in a function.
// Moreover, you may need references to some window.IDB* objects:
window.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.msIDBTransaction || {
   READ_WRITE: "readwrite"
}; // This line should only be needed if it is needed to support the object's constants for older browsers
window.IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange || window.msIDBKeyRange;
// (Mozilla has never prefixed these objects, so we don't need window.mozIDB*)
load more v

I think this will throw people off of using DELETE and PUT when in fact it seems to be supported by all major browsers, even IE 6.,A quick Google search shows that there are indeed several users who have had problems with DELETE and PUT in oldIE.,AFAIK as @jaubourg says it must be for an older browser we no longer support. You can file a pull request here to remove the sentence.,My understanding of this discussion is that there is no clear indication that PUT or DELETE is not supported by any browser supported by jQuery. Therefore I suggest that you remove the aforementioned warning from the documentation.

1 af30ac
load more v

Select2 comes with AJAX/JSONP support built in. In this example we will search for repositories using Github's API:,Select2 supports methods that allow programmatic control of the component:,with support for quick option filtering via a search box.,Select2 can be used to quickly set up fields used for tagging.

Example Code

    <link href="select2.css" rel="stylesheet"/>
    <script src="select2.js"></script>
        $(document).ready(function() { $("#e1").select2(); });
    <select id="e1">
        <option value="AL">Alabama</option>
        <option value="WY">Wyoming</option>
load more v

Old-style callbacks are also supported, but not recommended. Instead of .then() you can call .end():,HTTP method may also be passed as a string:,The .query() method accepts strings as well:,The auth method also supports a type of bearer, to specify token-based authentication:

SuperAgent is light-weight progressive ajax API crafted for flexibility, readability, and a low learning curve after being frustrated with many of the existing request APIs. It also works with Node.js!

       name: 'Manny',
       species: 'cat'
    .set('X-API-Key', 'foobar')
    .set('Accept', 'application/json')
    .then(res => {
       alert('yay got ' + JSON.stringify(res.body));
load more v

Get to know the SharePoint REST service,For an introduction to the SharePoint REST interface and its architecture, see Get to know the SharePoint REST service.,Table 2 shows properties that are commonly used in HTTP requests for the SharePoint REST service.,Requests are sent to the resource endpoint that's specified in the url property of the request. Endpoint URIs use the following format:

For more information about how you can obtain an access token, see Context Token OAuth flow for SharePoint Add-ins and Authorization Code OAuth flow for SharePoint Add-ins.

HttpWebRequest endpointRequest =
"http://<site url>/_api/web/lists");
   endpointRequest.Method = "GET";
   endpointRequest.Accept = "application/json;odata=verbose";
   "Bearer " + accessToken);
   HttpWebResponse endpointResponse =
load more v

Other "browsers-support" queries related to "Which browsers don't support a HTTP DELETE with jQuery.ajax? [duplicate]"