Issue 60915 in chromium: AJAX call not works on onBeforeUnload event

204 views
Skip to first unread message

chro...@googlecode.com

unread,
Oct 27, 2010, 11:01:21 AM10/27/10
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 Area-Undefined

New issue 60915 by hareshvidja: AJAX call not works on onBeforeUnload event
http://code.google.com/p/chromium/issues/detail?id=60915

Chrome Version : 6.0.472.62 (59676) Ubuntu 10.04
URLs (if applicable) :
Other browsers tested:
Safari 4: NOT TESTED
Firefox 3.x: OK
IE 7: OK
IE 8: OK

What steps will reproduce the problem?
1. AJAX call not works on onbeforeUnload event
2. alert box works properly on beforeunload

I want clear User login session when it click on back/refresh button or
redirect by changes on URL in online system. I have implemented clear
server side session using JavaScript for this by calling ajax
onBeforeUnload event.

Instead of my expectation it not clearing a user session after redirecting
a page. For testing purpose i have put alert box it displays as per my
expectations BUT after closing alert box it redirects a page but not clear
a server side session. It works fine in all other browsers as per my
expectations.

Please help me for this..

Thanks


chro...@googlecode.com

unread,
Oct 31, 2010, 1:53:41 AM10/31/10
to chromi...@chromium.org

Comment #1 on issue 60915 by hareshvidja: AJAX call not works on
onBeforeUnload event
http://code.google.com/p/chromium/issues/detail?id=60915

Please help me for this error.....
Please tell me if have any alternative solution for this

I am waiting for anyone's comment

chro...@googlecode.com

unread,
Dec 6, 2010, 3:08:41 AM12/6/10
to chromi...@chromium.org

Comment #2 on issue 60915 by RinRady: AJAX call not works on onBeforeUnload
event
http://code.google.com/p/chromium/issues/detail?id=60915

hehehehe :( :'(

You meet problem like I did..... but Ajax will works if:
( I don't want message alert but if no message alert, it will not work )
( This for IE but Chrome and Firefox work well if no message)

$(document).ready(function(){
window.onbeforeunload = function(){
logout();
return 'any string';
}
function logout(){
$.ajax({});
}
});

Reply all
Reply to author
Forward
0 new messages