Slow javascript execution in iframe only in IE

Problem:

I developed a web application . It is embedded in the site using iFrame.

If I run the application as a standalone (IE9), say: www.example.com/webapp, it loads in about ten seconds (this is a pretty big application). Chrome and FF are much faster.

If it is built into iFrame, IE completely loses it with javascript runtimes of up to 40-60 seconds , until the application is loaded. As soon as the application loads, but there are no problems, and it works flawlessly.

Recommendation: Offline: OK, in iFrame: Not OK.

Several xml are loaded in the web application, in particular very large, which is about 8 MB. Xml is parsed and content is created using KnockoutJS. However, this is not very important, as I narrowed it down to XML parsing, which is done using jQuery.

Standalone parsing takes about 10 seconds in IE9. Invested it in 40-60. I deleted the status logs and timestamps, and I can physically see that javascript is working with an incredibly slow inline . Each trace takes 4-6 times , which corresponds to an increase in the total load time.

FireFox and Chrome are immune and do not show any slowdown or so little slowdown that it is invisible.

I tried embedding iFrame and Object. The same results.

Question

, javascript (XML-, xml ), 4-6 , iframe, ?

. . . , , iframe. , iframe . , , , . . , , . , .

PS: , , , - . , . .

**

:

IE9 **

http://imgur.com/iYdMuPe

enter image description here

+4
4

, IE xml node jQuery . JS 15 . , , !

0

, jQuery.height(n) .width(n) , .css( "width", x) .css( "height", x) .

0

F-12 , . , .

, iFrame script . IE .

, , 8 XML . ?

, IE DOM ( Chrome). . , XML ( ), .

0

, @ern0, script , jQuery .height() .width() JS, .


. , JS offsetHeight .height(), .css("height") .style.height.

, .


. , jS vanilla .style.height *, .height() .css("height").

, , .


.style.height , jQuery. offsetHeight , style.height , ( ), . , .style.height, .

. , , , , .

0
source

All Articles