title: Why cant I load an external resource from jQuery load method?
body: <p>In the process of learning Ajax requests using jQuery, I tried to load google home page on the click of a link. So I wrote something like:</p>
  
  <pre><code>$("#ajax").click (function (event) {
      $("#g").html("Loading...");
      $("#g").load("http://www.google.com");
      event.preventDefault ();
  });
  </code></pre>
  
  <p>And somewhere in body:</p>
  
  <pre><code>&lt;a id="ajax" href="http://www.google.com"&gt;Load file ajax way&lt;/a&gt;
  &lt;div id="g"&gt;Click the above link to load the page...&lt;/div&gt;
  </code></pre>
  
  <p>Which didn't work and initially I thought there is some syntax error or something. But later when I replaced the google url with a static html file on server, it worked correctly.</p>
  
  <pre><code>$("#g").load("Temp.htm");
  </code></pre>
  
  <p>Is it designed to work like this (if yes, why?) or am I doing something wrong?</p>
  
  <p>EDIT: Please can anyone explain (or refer) the security problem introduced by cross domain ajax calls? In other words, why it is safe to open another browser tab and open google but NOT from within the page? Is it to protect caller or callee?</p>