Modifies asset URLs in generated pages to include a version number then strips these versions numbers off again on incomming requests. This allows the assets to be cached indefinately by the browser and updated on new versions of the website
This middleware will improve the performance of your web site by adding a version number to the URLs of static assets and instructing the browser to cache them indefinately.
Each time you release a new version of your web site you should increment the version number so that the browser sees them as new assets and fetches them from the server. Once the server has a particular version of an asset it will keep hold of it any not request it again, this improves the user experience and reduces load on your servers.
This middleware does two things
You can place this middleware in front of any downstream middleware that produces HTML and serves the assets referenced by that HTML. Typically this will be a combination of some page rendering middleware and teh static files middleware.
The OWIN Framework supports any configuration mechanism you choose. At the time of writing it comes bundled with support for Urchin and web.config configuration, but the IConfiguration interface is trivial to implement.
With the OWIN Framework the application developer chooses where in the configuration structure each middleware will read its configuration from (this is so that you can have more than one of the same middleware in your pipeline with different configurations).
If might want to configure it to:
This middleware is self-documenting. Use the Documenter middleware to extract and format documentation, or look at the VersioningConfiguration class which is deserialized from the configuration file.