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:
<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:
- Top 10 HTML5 Interview Questions
- Top 10 ASP.NET Interview Questions
- Comprehensive Series of ASP.NET Interview Questions
- Top 10 ASP.NET MVC Interview Questions
- Top 10 ASP.NET Web API Interview Questions
- Top 10 ASP.NET AJAX Interview Questions
- Top 10 WCF Interview Questions
- Comprehensive Series of WCF Interview Questions