How do I combine WebResource.axd and ScriptResource.axd files so as to result in less requests to my ASP.NET server?

后端 未结 3 1036
耶瑟儿~
耶瑟儿~ 2020-12-04 20:37

On a site I\'m working on, the pages are generating 45 external WebResource.axd and ScriptResource.axd files so the broswers have to request all 45 references. That\'s a lot

相关标签:
3条回答
  • 2020-12-04 21:08

    As the others have stated, using the ASP.NET AJAX Toolkit's ToolkitScriptManager rather than the default ASP.NET ScriptManager will allow you to do some script combining, including your own scripts embedded as resources - there's a good post about it at Script combining made easy.

    If you have the luxury of using ASP.NET 3.5 SP1, then there are some further additions to the ASP.NET ScriptManager that allow you to combine a lot more scripts, including general .js files in your solution into one script call.

    Check out the video here:

    Using Script Combining to Improve Performance

    0 讨论(0)
  • 2020-12-04 21:15

    Try using ajax - ToolkitScriptManager instead of asp - ScriptManager - it tends to combine as much of the resource requests as it can.

    0 讨论(0)
  • 2020-12-04 21:15

    here is a CodeProject article for both version of frameworks 2.0 & 3.5

    0 讨论(0)
提交回复
热议问题