title: Vanilla Javascript version of AJAX
body: <p>How can I remove the need to download a full jquery library when all I want to use is AJAX. Is there a smaller file that focuses on AJAX or is there a Vanilla Javascript version of this code?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $("button").click(function(){
  
              $.ajax({
                  type: 'POST',
                  url: 'cookies.php',
                  success: function(data) {
                      alert(data);
                  }
              });
     });
  });
  &lt;/script&gt;
  </code></pre>