title: Javascript history.PushState not working?
body: <p>I have this code here:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function goFunction(){
    history.pushState("google.ca", "GOOGLE CANADA", "http://www.google.ca");
    return event.preventDefault();
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;a href="#" onclick="javascript:goFunction();"&gt;GO&lt;/a&gt;
  </code></pre>
  
  <p>when I click on my link, I get this error in my error log:</p>
  
  <pre><code> Uncaught SecurityError: A history state object with URL 'http://www.google.ca/' cannot be created in a document with origin 'http://cowelllaserhair.com'. 
  </code></pre>
  
  <p>you can see this at: <a href="http://cowelllaserhair.com/test.html">http://cowelllaserhair.com/test.html</a></p>
  
  <p>What am I doing wrong?</p>
  
  <p>Do I need to reference something?</p>
  
  <p>Thanks,
  J</p>