简体   繁体   中英

IE9 slow loading javascript

IE 9 is taking over 10 seconds to display a web page vs Chrome taking less than 3 seconds.

Is there anything we can do to speed up the loading in IE 9?

35 .js libraries are loaded, with 5 of them taking in total over 11 seconds to load on IE (vs 2 seconds on Chrome). Screenshots below show IE (top) vs Chrome (bottom) longest loading components using websitetest.com.

It's a customer-facing site, so we have no control of the user browser so can't optimise the client IE at all. We have all .css files listed first, then .js files, as per recommendations.

加载Internet Explorer v9的最长加载组件的时间

Chrome v45的加载时间为最长的加载组件

A entire response to your question will be far too long. I can only give some hints :

  • Don't provide 35 javascripts files. Provide only one and minify it
  • Test and be sure that IE9 use its cache with your static files (javascript, css, images ...)
  • IE9 is very slow with Javascript. Especially with on thing : modifying the DOM. Be sure to manipulate your DOM only when you need it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM