Back | Reverse |

Something?
Link | by ryukoshen on 2003-10-28 15:25:46
Something I Didn't Really Understand In Your Logout Script: (In Bold Red)
function logout() {
     time = new Date();
     time.setTime(time.getTime() - 3600000);
     document.cookie = "login=guest; expires=" + time.toGMTString() + "; path=/";
     history.go();
}



Žq•ª
Heaven doesn't want me and hell's to afraid I'll take over!

Re: Something?
Link | by gendou on 2003-10-28 16:28:02
time = new Date(); // makes a new variable of type Date //
time.setTime(time.getTime() - 3600000); // sets the time variable to one day in the past //
the time variable is given to the browser as the "expire-time" for the cookie, and since it is in the past; the cookie is eaten by the bit bucked (is deleted; oh im so clever!)


Re: Something?
Link | by ryukoshen on 2003-10-28 20:08:58
You know something Gendou, that is Extremely clever... Holy shit o.o;


Žq•ª
Heaven doesn't want me and hell's to afraid I'll take over!

Back | Reverse |

Copyright 2000-2024 Gendou | Terms of Use | Page loaded in 0.0022 seconds at 2024-05-08 01:57:14