Skip to content

How can I disable RequestReduce?

mwrock edited this page Nov 12, 2011 · 5 revisions

RequestReduce can be disabled in whole or in part for an individual request or accross the entire page. Here are your options:

Completely shut it down

To completely shut off RequestReduce, simply remove the RequestReduce module from your web.config or remove it from the IIS management GUI.

Completely turn it off temporarily via config

If you want to disable the filter but keep RequestReduce installed, you can set the cssProcesingDisabled and javascriptProcessingDisabled configuration attributes to true. This will effectively stop RequestReduce from filtering your responses but it will still be able to serve requests for RequestReduce processed content.

Suppress RequestReduce for a Single Request

If you simply want to disable or suppress the filter from an individual request, you can append RRFilter=disabled to the request's querystring. If RequestReduce sees this key value pair in the url, it will not attach the response filter and the responce will contain the original raw response without RequestReduce's css, javascript and sprites.

Use the RequestReduce API to disable RequestReduce's filter based on your own custom rules

You can use the AddFilter method of the RequestReduce Registry to add a PageFilter that defines under what conditions RequestReduce should be suppressed.

Here is an example of how to disable RequestReduce for any Request under /admin/:

RequestReduce.Api.Registry.AddFilter(new PageFilter(x => x.HttpRequest.RawUrl.Contains("/admin/")));

The RequestReduce API passes the PageFilter the current HttpRequest and you can access any of its properties or use your own internal business logic to decide if RequestReduce should be suppressed. If you return true from this lambda, the request matching the criteria of the lambda will not have the RequestRedce filter applied.

See The RequestReduce API for details on its use.

Clone this wiki locally