If the browser supports Javascript you could insert a line of code into onunload event(this fires when the user navigates to another page) of the document body. You'll need to use a hidden frame and change its location to something like:
I am not sure whether this works, as there may be restrictions on the activities scripts can perform when the page is being unloaded:Code:http://www.myforum.com/action.php?action=offline
EDIT: I've just tested this in Firefox and Internet Explorer and it works as expected.Code:<html> <head> </head> <body onunload="document.getElementById('hiddenFrame').contentDocument.location='action.php?action=offline'"> <iframe id="hiddenFrame" src="about:blank" style="display: none"></iframe> </body> </html>




Reply With Quote