title: Embedding a Google search bar into a html document
body: <p>I'm creating an offline HTML document to set as my browser homepage for work.  I'd like to include a Google search bar at the top of the page that will allow me to search Google directly.</p>
  
  <p>Google seems to make it easy to embed a Google Custom Search Engine into the page which will let me use Google to search the local page, but I need it to redirect to Google and search there.</p>
  
  <p><strong>Their code:</strong></p>
  
  <blockquote>
  <pre><code>&lt;!-- Use of this code assumes agreement with the Google Custom Search Terms of Service. --&gt;
  &lt;!-- The terms of service are available at http://www.google.com//cse/docs/tos.html --&gt;
  &lt;form name="cse" id="searchbox_demo" action="https://www.google.com/cse"&gt;
    &lt;input type="hidden" name="cref" value="" /&gt;
    &lt;input type="hidden" name="ie" value="utf-8" /&gt;
    &lt;input type="hidden" name="hl" value="" /&gt;
    &lt;input name="q" type="text" size="40" /&gt;
    &lt;input type="submit" name="sa" value="Search" /&gt;
  &lt;/form&gt;
  &lt;script type="text/javascript" src="https%3A%2F%2Fcse.google.com%2Fcse/tools/onthefly?form=searchbox_demo&amp;lang="&gt;&lt;/script&gt;
  </code></pre>
  </blockquote>
  
  <p>Testing this form returns a Google results page with no results that changes the url to: google.com/cse?cref=&amp;ie=utf-8&amp;hl=&amp;q=test&amp;sa=Search#gsc.tab=0&amp;gsc.q=test&amp;gsc.page=1</p>
  
  <p>Surprisingly, I couldn't find any answers on SO or various search engines.  I tried to create a form, use GET, and redirect to <a href="https://www.google.com/search" rel="nofollow">https://www.google.com/search</a>? and <a href="https://www.google.com/search?q=" rel="nofollow">https://www.google.com/search?q=</a> with no luck.  It keeps changing the url search parameter following the ?</p>
  
  <p>I know I'm overlooking something simple but can't find the answer anywhere.
  Simply put, is Google preventing any search queries from offline documents in an effort to fight scripts/robots?</p>