title: Trouble with iframes
body: <p>I'm generating iframes dynamically for a lot of different random websites, and I tend to get this error in my javascript console (not necessarily with this url):</p>
  
  <pre><code>Unsafe JavaScript attempt to access frame with URL http://localhost:3000/results/ from frame with URL http://www.apple.com/iphone/. Domains, protocols and ports must match.
  </code></pre>
  
  <p>Why am I getting this error? Is there a way to get rid of it?</p>
  
  <p>So the only two times I interact with iframes in javascript is when I dynamically load in an iframe:</p>
  
  <pre><code>$("#results_div").html('&lt;iframe src='+url+' frameborder="0" class="iframe"&gt;&lt;p&gt;Browser does not support iframes.&lt;/p&gt;&lt;/iframe&gt;');
  </code></pre>
  
  <p>and when I pull the <code>src</code> attribute of an iframe:</p>
  
  <pre><code>var previewed = $("iframe").attr("src");
  </code></pre>
  
  <p>Which one is causing the error?</p>