none
IE11 bug - javascript script continues execution after the tab is closed RRS feed

  • Question

  • Steps to reproduce:

    1. Open 2 blank tabs in IE.

    2. In one of them navigate to this demo page: http://jsfiddle.net/MTJ27/15/ ; it runs 4 web workers in a loop.

    3. Check the CPU utilization (on a 8-core machine it should show 50%, for 4 cores or less: 100%).

    4. Close the tab that displays the demo page; leave the other tab open.

    5. Check the CPU utilization again -> it doesn't drop! IE still runs these web workers (IMO).

    It's a bug,  isn't?

    Regards,

    Robert
    Sunday, September 28, 2014 6:23 PM

All replies

  • Hi,

    Could you please have a share with the steps about how to reproduce the "bug" you mentioned?

    I could not run the scripts under the shared URL (The run button seems not work here).

    Another thing that we might take a try is to end the same task under Task Manager, and then check if the symptom would be the same.

    For debugging scripts, or writing scripts that would work in a webpage, we may take use with the F12 debug tool:

    Using the F12 developer tools

    Best regards


    Michael Shao
    TechNet Community Support

    Monday, September 29, 2014 11:10 AM
    Moderator
  • Hi,

    Please follow the steps described below (see screenshots):

    1. Open 2 blank tabs in IE. Check CPU Utilization of the IE processes (should be 0%)

    2. Run the demo: http://jsfiddle.net/MTJ27/15/ in one of these tabs. You don't have to click 'Run'...

    Check the CPU utilization. Should be quite high, due to running web workers.

    Check the following screenshots to see steps 1 and 2:

    http://oi59.tinypic.com/2qn1c3c.jpg

    3. Close the tab that displays the demo page; leave the other (empty) tab open. Check the CPU utilization again -> it doesn't drop! IE still runs these web workers in the background (THE BUG)

    Check the following screenshot to see the step 3:

    http://oi62.tinypic.com/29diq34.jpg

    To sum up: you can close the tab, but the IE will still run the script in the background.

    Workarounds: You have to either kill the single process via task manager or close the entire window to stop the js script from running in the background.

    Best regards,

    Robert Bar


    • Edited by rbtbar Friday, October 3, 2014 6:31 PM formatting
    Friday, October 3, 2014 6:28 PM
  • Seems the scripts is not very good here?

    how about hte other browsers? Same behavior as in IE?

    Rgds

    Friday, October 10, 2014 2:27 AM
  • Yes, worker script is 'stupid', but useful. It shows that IE cannot stop it after the tab is closed.

    The other browsers (FF32, Chrome37) behave correctly. Worker scripts are stopped as soon as the user closes the tab.

    Friday, October 10, 2014 4:02 PM