title: Unable to delete cookie from javascript
body: <p>I am on an external site, and I am trying to delete the cookie via javascript.</p>
  
  <p>I did the following in the console:</p>
  
  <pre><code>function deleteAllCookies() {
      var cookies = document.cookie.split(";");
  
      for (var i = 0; i &lt; cookies.length; i++) {
          var cookie = cookies[i];
          var eqPos = cookie.indexOf("=");
          var name = eqPos &gt; -1 ? cookie.substr(0, eqPos) : cookie;
          document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
      }
  }
  
  deleteAllCookies()
  </code></pre>
  
  <p>which is supposed to set the document cookie to expire in 1970</p>
  
  <p>But after that, I call </p>
  
  <pre><code>document.cookie.split(";")
  </code></pre>
  
  <p>The cookies are seemingly untouched. Any ideas why?</p>
  
  <p>PS: code above is from stackoverflow
  <a href="https://stackoverflow.com/questions/179355/clearing-all-cookies-with-javascript">Clearing all cookies with JavaScript</a></p>