5

I am going though our ASP.NET WebForms project and attempting to make changes suggested by tools such as YSlow and others. We use the built in bundling & minification that came with .NET 4.0 for the files we've added to the project, but there are still a few JavaScript files that the WebForms framework includes unminified: ScriptResource.axd and WebResource.axd

I've looked around and found a lot of 3rd party solutions for how to get these file to be minified, but all these solutions are a few years old before a JS compressor was built into the framework. Now that's it's built in, it seems like it should be possible to harness this somehow.

How can I get these *.axd files to have a minified output?

Chris Barr
  • 29,851
  • 23
  • 95
  • 135
  • Since these are generated by .NET, I don't think you can achieve that. If you had a handler that intercepted the request to those files, then you would need to send another request from your code (using a WebClient) or whatever, get the data, minify it, and render it, BUT, if you do that, then it's pretty much the same as requesting them whole and not minified. – Saturn K Dec 30 '14 at 22:41
  • possible duplicate of [Compress and Minify WebResource.axd and ScriptResource.axd in ASP.NET 4 WebForms](http://stackoverflow.com/questions/28111870/compress-and-minify-webresource-axd-and-scriptresource-axd-in-asp-net-4-webforms) – bummi Mar 30 '15 at 07:48

1 Answers1

0

axd files are embedded resources files inside the ASP.net custom server controls. you need to minify the resources before compiling the custom server control.

or you can checkout this article, for combining them, i think it can help you http://www.codeproject.com/Articles/30215/Combining-Compressing-Minifying-ASP-NET-ScriptReso