asp.netiishttpmodulebundling-and-minificationasp.net-bundling

how do i know most used javascript and css files?


How do I know what are all the Javascript and CSS files is called by the clients from IIS server? Can this be done via httpmodule?

Basically what I want to know is that when the client is accessing the server i want to know what are the files that are consumed mostly along with their size and time taken to serve the request.


Solution

  • I think the quickest way to do this is like this: In IIS Management console, make sure logging is enabled, and set it to the place you want. After a short delay, the log files will appear, import them to a database and start analyzing. You can choose which fields you want to save.

    Alternatively if you want to have more control and do this in real time, you could create a handler or module, but you will also have to make sure all requests, including static content, go through the asp processor, which will create quite some overhead. Very much not recommended for dev time and performance, but it will work.