开发者

IE7 CPU spikes, script problems & debugging?

开发者 https://www.devze.com 2023-04-12 23:46 出处:网络
A website I\'m currently designing displays and works perfectly in all mac browsers, and Windows Firefox, Chrome and IE 8.

A website I'm currently designing displays and works perfectly in all mac browsers, and Windows Firefox, Chrome and IE 8.

I'm having major problems in IE 7 though. Whilst the CSS is pretty much there (a few tweaks needed), the site is maxing out my CPU at 100% rendering th开发者_如何学JAVAe site almost unusable and giving me scripting errors and javascript functionality is not working.

I don't even know where to start trying to find out what's maxing out the CPU, or how to get more info on the scripting messages - it tells me the line the problem is on but it doesn't tell me what file.

I'd like to provide a link but the client has asked me not to.

Any help would be greatly appreciated.

Thank you


Most likely, this issue is caused by ie's poor png rendering capabilities. In the situation that I have experienced, we were using jquery ui 1.8.7 to render modal dialogs and seeing the memory usage spike by 6-8 mega every time a dialog box was opened. It turns out that the culprit was the opacity and alpha CSS settings in the default jquery styles. See this post for a possible partial fix.

Other things to note include:

There seem to be many fixes that attempt to address this issue.

Jquery 1.8.16 has a partial fix where the large memory jump will only happen when the first dialog box is opened.

We have also experimented by setting a single pixel png as the modal background and this rendering of a single pixel caused the memory used by IE to spike 80 megs and caused a temporary spike in CPU usage.

One other peculiar observation was that if we set the modal value of the jquery dialog to false and created our own modal background by appending a div whose background was set to a semi-transparent png, the memory leak seemed to be smaller.

The short of it was to stop using transparent pngs and the opacity and alpha settings foe rendering in IE.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号