title: ajax in mvc with default settings
body: <p>We have a lot of ajax calls in our application.</p>
  
  <p>Can we set basic parameters such as headers, async, datatype in layout file and use  / override only the parameters that change when making the call.</p>
  
  <p>eg. In layout file</p>
  
  <pre><code>  $.ajax({
          dataType: "json",
          async: false,
          headers: { "Accept-Encoding": "compress, gzip" }
    });
  </code></pre>
  
  <p>eg: in calling file</p>
  
  <pre><code>$.ajax({
          url: "@Url.Action("GetState", "Country")",
          async: true,
          data: { search: search, StateId: state },
          success: function (data) {   
          }
    });
  </code></pre>