Postback not works when using HTTPCompression

Some members asked this question on forums.

When i am going to compress the .aspx pages using HTTPCompression, the postback will not works. Because it also compressing the Scripresource.axd, webresource.axd file.

To make the postback works in your project  you do not compress the above two files, by adding these code.

Solution:


........,

<HttpCompress  compressionType="GZip">
 <ExcludedPaths>
 <add path="scriptresource.axd" />
 <add path="webresource.axd" />
 </ExcludedPaths>

....,

And one more thing don’t compress the images like jpg, gif, jpeg etc.. because its already compressed one. if you compress the image it will degrade the performance. you should the exclude the image from compression.

Solution:


..,

<ExcludedMimeTypes>
 <add mime="image/jpeg" />
 </ExcludedMimeTypes>
 </HttpCompress>

Thanks to all.

Follow

Get every new post delivered to your Inbox.