WebResource.axd and ScriptResource.axd in ASP.NET

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInDigg thisPin on Pinterest
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.We can easily find the following HttpHandler entry in root configuration file:
<add path=”WebResource.axd” verb=”GET” type=”System.Web.Handlers.AssemblyResourceLoader” 
validate=”True”/>
WebResource.axd primarily focussing on embedded resources specifically web forms and validations scripts while ScriptResource.axd is more focussed on those scripts that have been registered with ScriptManager control.
ScriptResource.axd has some additional features:

  • Keeping different types of the same resource i.e. for debug and release.
  • Compress scripts for transfering over HTTP.
  • It can also be used for other frameworks as jQuery.
Hopefully, purpose of these resource files (webresource.axd and scriptresource.axd) will be more clear and understandable

Top 10 Interview Questions and Answers Series:

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInDigg thisPin on Pinterest