I would like to compress my .aspx pages.
When I tried using Gzip, the page size was greatly reduced, but the Ajax on the page stopped working.
Thank you for help.
Could you please be more specific on how you are currently using GZip? Are you using this in a HttpModule? Are you using it specific on pages only?Did you ever find a solution to this? I am having the same problem while using an IHTTPMODULE. Very, Very, frustrating...
In the BeginRequest of your HttpModule you should check wheter there are ajax headers in the page:
for example:
check first if there are headers otherwise you could use compression:
string ajaxHeaders = app.Request.Headers.Get("X-MicrosoftAjax");if (String.IsNullOrEmpty(ajaxHeaders))
{
///compression...
}
Ajax should be working than and you can use compression on pages that dont use ajax.
No comments:
Post a Comment