title: Allowing cross-domain requests in Safari and Chrome? Server response vs. command line arguments
body: <p>I am trying to make cross-domain requests with Safari on Windows. My Safari version is 5.1.2.</p>
  
  <p>This is a classical question. I read in many places that Chrome and Safari allows cross domain requests as long as Server responds with the followin header in the response</p>
  
  <pre><code>Access-Control-Allow-Origin: *
  </code></pre>
  
  <p>I have read this post.
  <a href="https://stackoverflow.com/questions/6826282/how-to-allow-cross-domain-requests-in-safari">How to allow cross-domain requests in Safari?</a>
  and many others on the stackoverflow site too.</p>
  
  <p>However, none of them answers my question.</p>
  
  <p>I am having problems with Chrome AND Safari doing cross-domain AJAX requests even though I am sending the necessary header back from the server.</p>
  
  <p>I finally ran Chrome with "--disable-web-security". Then it worked. </p>
  
  <p>My questions:</p>
  
  <p>1) What do I do with Safari? Do I use a similar command line argument?</p>
  
  <p>2) More importantly, can I someone please tell me whether cross-domain functionality is allowed in Chrome and Safari by default as long as server responds with the header or do I have to make sure that</p>
  
  <p>a) server responds with a header</p>
  
  <p>AND</p>
  
  <p>b) browser is started with a proper argument.</p>