我为什么要在HTTP头不COM preSS图像? [英] Why I should not compress images in HTTP headers?
问题描述
我读到的HTTP头COM pression一些文章。今天,我安装了YSlow的,并建议我COM preSS的资源(文/ HTML,JavaScript,CSS和图像)。现在,我在看文档 Apache的mod_deflate模块但在这个例子不COM preSS图像。
I read some articles about HTTP headers compression. Today I installed YSlow and it recommends that I compress the resources (text/html, javascript, css and images). Now I'm reading the documentation for Apache mod_deflate but in the example don't compress images.
我应该还是我不应该在我的网站COM preSS图像?
Should I or should I not compress images in my site?
推荐答案
您的图像应该已经融为一体pressed - 任何额外的COM pression不会对文件大小任何明显的效果,反而会增加处理时间
Your images should already be compressed - any extra compression won't have any noticeable effect on filesize, but will increase processing time.
- .png文件使用DEFLATE COM pression 了。
- .jpg文件通常使用有损COM pression 。
- .gif文件使用LZW COM pression 。
- .png files use DEFLATE compression already.
- .jpg files generally use lossy compression.
- .gif files use LZW compression.
的COM pressing,其上已经融为一体pressed很少导致在文件大小的减少,并能往往会增加文件大小。
Compressing files that have already been compressed very rarely results in a reduction in filesize, and can often increase filesize.
这篇关于我为什么要在HTTP头不COM preSS图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!