Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 of references so I'd like to know if there is a way that all of those requests could be combined into one request? I've seen that the Script Manager is supposed to be able to do something regarding that but I haven't seen any results with the WebResource.axd and ScriptResource.axd files.

How would I go about getting these to all combine?

like image 772
Paul Mendoza Avatar asked Feb 02 '09 23:02

Paul Mendoza


People also ask

What is WebResource Axd and ScriptResource Axd?

WebResource. axd and ScriptResource. axd are basically HTTP handlers in . NET Framework implementing IHttpHandler interface. Purpose of these HTTP handlers is to get the embedded resources inside an assembly.

What is WebResource Axd file in asp net?

WebResource. axd is the native MS AJAX framework web resource handler and its URL encryption, decryption and processing are done by the . NET framework.

What is the use of WebResource Axd?

WebResource. axd is the new Handler that enables control and page developers to download resources that are embedded in an assembly.


1 Answers

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

like image 141
Zhaph - Ben Duguid Avatar answered Oct 02 '22 20:10

Zhaph - Ben Duguid