title: Why url with www and without www behaves differently for JSON request
body: <p>I am using getJSON to get data from a text file on my server I am providing absolute URL in getJSON request </p>
  
  <pre><code>var server="http://abc.com/text.json"
  $.getJSON(server,function(data){
      console.log(data);
  })
  </code></pre>
  
  <p>so when I access the site with URL <a href="http://abc.com/" rel="nofollow">http://abc.com/</a> I get the JSON values proper but when i access the same site with URL <a href="http://www.abc.com/" rel="nofollow">http://www.abc.com/</a> it shows error</p>
  
  <pre><code>Origin http://www.abc.com is not allowed by Access-Control-Allow-Origin.
  </code></pre>
  
  <p>both URL pointing to the same page then why the getJSON is behaving differently</p>