0

I google that there are many issues about IE animation, however no one can answer my question positively. Like Animated GIF while loading page does not animate , ie animated gif freeze til page loads and so on.

I do the following tests :

  1. Open a running gif with Chrome and IE11, say http://127.0.0.1/loading.gif. You should see both gifs works well.
  2. Open IE devtools and Chrome devtools, paste the following code

    for(var i=0; i <= 2000000000; i++){if(i==2000000000) console.log("Script finished")}
  3. See the result again. Now the gif opening with chrome can still running, but the gif openning with IE11 is freeze until the background script finished.

Why gif not running on IE11 with background script ? Is it possible to resolve or workaround it ?

Does
  • 569
  • 6
  • 24

1 Answers1

0

The execution of a web page is top-down and single-threaded. Javascript may look multi-threaded, but the fact is that Javascript is single-threaded. This is why when loading an external javascript file, the parsing of the main HTML page is suspended.

This is how the IE browser loads the web page. It can possible that Chrome has a little bit different approach.

I suggest you refer to the thread below that may help you to understand this topic.

Load and execution sequence of a web page?

Deepak-MSFT
  • 10,379
  • 1
  • 12
  • 19
  • Could you please clarify more details about the little bit different approach of Chrome in order to accept your answer ? – Does Jan 21 '20 at 05:34
  • I suggest you check the network tab of the developer tools in both browsers by loading a similar page that may show the difference. another thing I read that Chrome optimizes the page to improve the performance and shorting the loading time. – Deepak-MSFT Jan 21 '20 at 10:06