title: Error : in a frame because it set 'X-Frame-Options' to 'sameorigin'
body: <p>I got the following <code>error</code> when I implement <strong><code>patent search google</code></strong> in <strong><code>iframe</code></strong>.</p>
  
  <pre><code>in a frame because it set 'X-Frame-Options' to 'sameorigin'.
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>document.getElementById("go_search").onclick = function() {
    myFunction();
  };
  
  function myFunction() {
    var patent_content = document.getElementById("patent_content").value;
  
    var html_content = '&lt;iframe crossorigin="anonymous" src="https://patents.google.com/?q=' + patent_content + '&amp;embedded=true" height="200" width="300"&gt;&lt;/iframe&gt;';
    document.getElementById("result").innerHTML = html_content;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h2&gt;Google Patent Search&lt;/h2&gt;
  &lt;form&gt;
    &lt;p&gt;Paste your content&lt;/p&gt;
    &lt;textarea id="patent_content"&gt;&lt;/textarea&gt;
    &lt;input type="button" id="go_search" value="go" /&gt;
  &lt;/form&gt;
  &lt;div id="result"&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Please help me to fix it.</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Error:</strong>
  In Chrome</p>
  
  <pre><code>patent.html:1 Refused to display 'https://patents.google.com/?q=fghfhfghfg' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
  patent.html:24 GET https://patents.google.com/?q=fghfhfghfg net::ERR_BLOCKED_BY_RESPONSE
  </code></pre>
  
  <p><strong>Error:</strong>
  In Mozilla</p>
  
  <pre><code>Load denied by X-Frame-Options: https://patents.google.com/?q=dsfsdfsd&amp;embedded=true does not permit cross-origin framing.
  </code></pre>