Cookies what created in iframe reset after parent page reloaded
<p>I have a index.php and a hidden iframe inside it. When someone on the main page clicks on something then JavaScript changes the iframe's src attribute. For example, a user clicks on link1 and JavaScript changes <code>iframe src='update.php?clicked=1'</code> and update.php saves into a cookie) but when the parent page is reloaded all cookies data is lost.</p>

<p>The cookie path is "/", update.php is in same directory than index.php, so it should work, shouldn't it? As long as the parent page isn't refreshed everything works.</p>