protected
void
Application_PostReleaseRequestState(
object
sender, EventArgs e)
{
string
contentType = Response.ContentType;
if
(contentType ==
"text/html"
|| contentType ==
"text/css"
|| contentType ==
"application/x-javascript"
|| contentType ==
"application/json"
)
{
Response.Cache.VaryByHeaders[
"Accept-Encoding"
] =
true
;
string
acceptEncoding = Request.Headers[
"Accept-Encoding"
];
if
(acceptEncoding !=
null
)
{
if
(acceptEncoding.Contains(
"gzip"
))
{
Response.Filter =
new
GZipStream(Response.Filter, CompressionMode.Compress);
Response.AppendHeader(
"Content-Encoding"
,
"gzip"
);
}
else
if
(acceptEncoding.Contains(
"deflate"
))
{
Response.Filter =
new
DeflateStream(Response.Filter, CompressionMode.Compress);
Response.AppendHeader(
"Content-Encoding"
,
"deflate"
);
}
}
}
}
I got this code in global.asax, i want gzip enabled, but not on iis level, but after this, radDateTimePicker is broken.
it still "works" but it has no style, pick button is repeated in strange way, and the title of hyperlink is shown instead of image button; Am i doing something wrong?