23
Fexell
6y

Finally it arrived!

Comments
  • 1
    jQuery > Vue (jk)
  • 3
    Jquery(30kb) > Vue.js(21kb)
    Nothing to joke about xD
  • 3
    @DanijelH

    Well that's not fair. Vanilla = 0kb.
  • 1
    @phiter

    Close, but muh ajax bruh.
  • 1
    @Stebner55 Vanilla ajax is so easy, no clue why anyone would use that monolithic piece of shit that jQuery is only for Ajax
  • 0
    @620hun

    Easy? Sure...Concise and efficient? Nada...
    And you don't need to grab the entire library just for ajax.

    Vanilla:

    var xhr = new XMLHttpRequest();
    xhr.open('GET', 'send-ajax-data.php');
    xhr.send(null);
    xhr.onreadystatechange = function () {
    var DONE = 4; // readyState 4 means the request is done.
    var OK = 200; // status 200 is a successful return.
    if (xhr.readyState === DONE) {
    if (xhr.status === OK)
    console.log(xhr.responseText); // 'This is the returned text.'
    } else {
    console.log('Error: ' + xhr.status); // An error occurred during the request.
    }
    }
    };

    vs jquery:

    $.get('send-ajax-data.php', function(response){ });
Add Comment