title: cakephp: how to destroy cakephp cookies on page refresh and on closing browser window
body: <p>How to destroy cakephp cookies on page refresh or when I close the browser window?</p>
  
  <p>my code:
  merry_parents_controller.php</p>
  
  <pre><code> $this-&gt;Cookie-&gt;write('MerryParent.id',$this-&gt;MerryParent-&gt;id,false,0);
                      echo 'cookie MerryParent.id: '.$this-&gt;Cookie-&gt;read('MerryParent.id');
                      $this-&gt;set('id',$this-&gt;Cookie-&gt;read('MerryParent.id'));
  </code></pre>
  
  <p>thanks.</p>