title: No 'Access-Control-Allow-Origin' header is present on the requested resource jquery ajax
body: <p>I have to set the cookie value on the button click. The return value is just a success/failure message. I am using php for set cookie. I am using jquery ajax() for making request. but when i click on the button nothing is happening and i am getting an error message as "No 'Access-Control-Allow-Origin' header is present on the requested" in the error console. </p>
  
  <p>The following is my ajax call,</p>
  
  <pre><code>    $('#visitors').click(function(){
                  $.ajax({
                      type:'POST',
                      url:'http://site_url/setCoocky.php?action=SET_COOCKIE&amp;user=visitor',
                      crossDomain: true,
                      headers: { 'Access-Control-Allow-Origin': '*' },
                      /* beforeSend: function (request) {
  
                          //request.setRequestHeader("Access-Control-Allow-Origin: ", "*")
                          },*/
  
                      success:function(resp){
                          window.location.href = site_url+"#!/pageHome";
                      }
                  });
  
          });
  </code></pre>
  
  <p>please help me..</p>
  
  <p>Thanks&amp; regards,
  johncy binoy</p>