Script Unload

Amish

09-08-2006 23:28:37

I see when player.vibe is unloaded it runs logout.vibe but it dosnt actually run for me. I added in

print("<script>alert('logged out')</script>");


And if i physically run logout.vibe then it works but if i jsut close the browser. nothign happens.

siit

09-08-2006 23:56:25

yea, this is a browser issue. firefox is better at running the page on the leave event. but IE is terrible and almost never runs it. so usually users "normally" end up logging out by timing out on the server.

I looked into this quite a bit before but found no perfect solution that works fine everywhere. I've requested a logout button in the design for the new standard skin in order to have one kind of solution at least.

Amish

10-08-2006 00:09:08

yeah basically im making a script that saves my current playlist when it closes and loads it back up when i start.

siit

10-08-2006 00:52:29

humm, nice feature. but well, you can't trust any DOM events really to execute automaticly when you leave the page as far as I know /