我正在尝试尽量减少调用,ScriptResource.axd
但我失败了。下面是结果
Uaing .Net 4.0、AjaxControlToolkit ver 4.1.60919.0 和 ScriptManager 添加为
<asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release">
<CompositeScript>
<Scripts>
<asp:ScriptReference name="MicrosoftAjax.js"/>
<asp:ScriptReference name="MicrosoftAjaxWebForms.js"/>
<asp:ScriptReference name="Compat.Timer.Timer.js" assembly="AjaxControlToolkit, Version=4.1.60919.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
<asp:ScriptReference name="Common.Common.js" assembly="AjaxControlToolkit, Version=4.1.60919.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
<asp:ScriptReference name="Animation.Animations.js" assembly="AjaxControlToolkit, Version=4.1.60919.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
<asp:ScriptReference name="ExtenderBase.BaseScripts.js" assembly="AjaxControlToolkit, Version=4.1.60919.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
<asp:ScriptReference name="CollapsiblePanel.CollapsiblePanelBehavior.js" assembly="AjaxControlToolkit, Version=4.1.60919.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
</Scripts>
</CompositeScript>
</asp:ScriptManager>
我的网站运行良好,但突然客户开始抱怨它很慢。我从客户端检查了网站,发现每次点击大约需要。10 秒,无论是数据库调用还是简单的循环最多 30 秒。
我查了一下,发现和之间的时间Application_BeginRequest
不到Application_EndRequest
一秒。然后在 IE Profiler 上,我知道有各种调用ScriptResource.axd
,因此试图缩小这些调用。
请帮助并让我知道这些配置有什么问题。
编辑
到目前为止,在缩小对ScriptResource.axd
. 我很确定
每次单击大约需要。10 秒
由于这些多次调用ScriptResource.axd
. 如果是其他原因导致了这么多延迟,那么请引导我朝着正确的方向前进。