iframe降低了我网站的性能 [英] Iframe reducing performance for my site

查看:147
本文介绍了iframe降低了我网站的性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello all



我在iframe中创建modelpop-up(我的项目需要它)



但我看到一个惊讶的场景



当我的I帧打开时,CPU Usages接近90%! ,当我关闭它时,iframe再次使它(cpu使用率)达到5-6%。



有没有任何机构知道为什么会发生这种情况

Hello all

I am creating modelpop-up in Iframe (my project needs it)

But i watched one surprised scenario

when ever my I frame opens, the CPU Usages touches almost over 90%!! ,and when i closed it the Iframe again its(cpu usage) come arround 5-6 %.

Has any body has Idea why this is happening

推荐答案





我建议使用showModalDialog功能。 br />
showModalDialog [ ^ ]



所以,在客户端点击任何按钮/链接(因为你使用模态弹出窗口的目标控件),添加下面的代码。

Hi,

Instead of "IFrame" in modal popup, i suggest to go for showModalDialog" feature.
showModalDialog[^]

so, on client click of any button/ link (as you were using target control for modal popup), add below code.
function openWindow()
{
    return window.showModalDialog(url);
}



因此,这将打开指定的屏幕url作为模态对话框。之前的屏幕控件不是acc可以。



您可以在新屏幕中保留一个按钮,并在客户端点击下面添加代码。


So, this will open the screen specified in url as modal dialog. the previous screen controls are not accessible.

you can keep one button in that new screen, and on client click of the add below code.

function CloseWindow()
{
    return window.close();
}



这将关闭模态对话框。



这样你可以避免使用IFrame,这是一个可以避免使用的选项,也可以实现模态。



希望它有所帮助。


this will close the modal dialog.

like this you can avoid the use of IFrame and this is once of the options using which you can avoid it and also you can achieve modality.

hope it helps.


这篇关于iframe降低了我网站的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆