Is it possible detect browser process termination?

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
View Poll Results: Was the post useful? Please provide your vote.
Yes 0 0%
No 0 0%
Voters: 0. You may not vote on this poll

Reply

Join Date: Oct 2009
Posts: 2
Reputation: nilesh.shinde is an unknown quantity at this point 
Solved Threads: 0
nilesh.shinde nilesh.shinde is offline Offline
Newbie Poster

Is it possible detect browser process termination?

 
0
  #1
Oct 24th, 2009
I am a newbee to JavaScript was was just fiddling around with events for a browser...

Is it possible to detect the browser process termination done through the Task Manager in windows.

Process:
1. Goto Task Manager
2. Right click on the browser process e.g. iexplorer.exe
3. Select "end process" to terminate the process

JavaScript can detect the window close by using body onunload event. On the similar bases, is it possible to detect the process termination event using JavaScript??

I tried a simple example using body onunload, but it failed to run the onunload event during the browser process termination. And i am of the opinion that this is not possible as all using JavaScript since terminating a process is a system / OS level task and is not related to browser events.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 885
Reputation: Airshow will become famous soon enough Airshow will become famous soon enough 
Solved Threads: 127
Airshow's Avatar
Airshow Airshow is offline Offline
Practically a Posting Shark
 
0
  #2
Oct 24th, 2009
Nilesh,

I just tried and got the same result - onunload doesn't fire if process is killed.

I guess you're right - terminating the process acts at too high a level. The javascript engine must die before it has a chance to respond.

That said, I tested with IE6 under win 2000. It's just possible that there may be differneces in bahaviour depending on browser and OS. However, it seems certain that you can't rely on the event firing for all users in an internet-served application.

Airshow
50% of the solution lies in accurately describing the problem!
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 2
Reputation: nilesh.shinde is an unknown quantity at this point 
Solved Threads: 0
nilesh.shinde nilesh.shinde is offline Offline
Newbie Poster
 
0
  #3
Oct 24th, 2009
Thanks for your prompt reply..
i can now firmly conclude that this is not possible!!

Thanks for confirming on my understanding too...
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum


Views: 335 | Replies: 2
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC