
October 4th, 1999, 09:56 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
How can I delete a temporary cookie in NS?
Can anyone tell me why the code below deletes 1 of the set cookies in IE, but not in NS?
<script language="javascript">
//set cookie
document.cookie= 'content=' + escape(location.pathname) + escape(location.search) + '; path=/';
document.cookie= 'url=' + escape(location.protocol) + escape(location.pathname) + '; path=/';
alert(document.cookie);
//delete cookie
var exp = new Date();
exp.setTime(exp.getTime() - 1);
document.cookie= 'content=' + escape(location.pathname) + escape(location.search) + '; path=/; expires=' + exp.toGMTString();
alert(document.cookie);
</script>
Thanks
|