如何为iis7中的图像启用gzip? [英] How to enable gzip for images in iis7?

查看:250
本文介绍了如何为iis7中的图像启用gzip?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iis7管理器中设置动态压缩和静态压缩。所以html,css,js内容压缩ok和我看到标题Content-Encoding:gzip,但不与图像格式:jpeg,gif甚至bmp。

一般来说,你不会想。 JPEG,GIF和大多数(互联网)图像格式已压缩。第二次压缩它们会增加很大的服务器开销,从而增加非常小的增益(可能会丢失)。


I set dynamic compression and static compression on in iis7 manager. So html,css,js content is compressed ok and i see in headers Content-Encoding:gzip, but not with image formats: jpeg, gif and even bmp.

解决方案

Generally speaking, you wouldn't want to. JPEG, GIF, and most (internet) image formats are already compressed. Compressing them a second time would add a lot of server overhead for very little size gain (and possibly a loss).

这篇关于如何为iis7中的图像启用gzip?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆