title: Delete all Cookies of browser using javascript
body: <p>I am using this JavaScript Code, but it will return only cookies of a particular page. I want to clean all the cookies of Browser</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";
      }
  };
  </code></pre>