ASP.NET web application - WebResource.axd and Scri

2019-03-09 12:53发布

问题:

. Hi, We are building an ASP.NET application with C#.net as language.

Here, when the IIS renders a page & when we analyze the page code with YSlow tool it shows many WebResource.axd and ScriptResource.axd files (as we are referring many script files in the page).

Server-side code is executing fast but loading of these .axd files is taking time. So would you please guide me on this, if there is a way to optimize or suppress these axd files?

If would be great if you could also provide a reference document or web references (If needed).

Many Thanks, Regards.

回答1:

WebResource.axd and ScriptResource.axd references are embedded resources in the .NET Framework. WebResource.axd scripts are probably for web forms and validation while ScriptResource.axd is for ASP.NET AJAX.

You can combine the ScriptResource.axd scripts into one include by using the ToolkitScriptManager (part of the ASP.NET AJAX Control Toolkit).

I'm not sure of a way to combine the WebResource.axd scripts.

See this question for more on combining scripts.



回答2:

jrummell is right on but if you want a detailed explanation of ways to improve that I would suggest this link:

ASP.NET AJAX Performance Improvement

It gives detailed information on script combining, turning on caching, and etc. Trust me it will help you speed it up.



回答3:

I realize I'm a couple years late here, but for all you googlers out there, I just pushed a new release of my on the fly js/css minifier/merger RequestReduce that successfully merges Webresource and scriptresource files at run time.