博客
关于我
迁入阿里云后:解决了一个IIS动态内容压缩的问题
阅读量:417 次
发布时间:2019-03-06

本文共 521 字,大约阅读时间需要 1 分钟。

迁移至阿里云后,带宽成本显著提升,节约带宽成为新的重点任务。为了实现这一目标,我们需要对除图片之外的所有内容进行压缩。然而,近期发现博客RSS站点带宽占用异常高,经过检查发现问题出在RSS返回给浏览器的响应内容未被压缩。值得注意的是,博客园RSS采用全文输出模式,这本身就属于高带宽占用群体。经过进一步调查,问题并非源于IIS动态内容压缩未启用,而是由于IIS未识别并处理RSS的Content Type类型。

IIS的动态内容压缩功能基于MIME类型工作。在默认配置中,仅对与定义的MIME类型匹配的内容进行压缩。具体而言,我们的RSS返回内容的Content-Type设定为text/html; charset=utf-8,这一设置在IIS默认MIME类型中未包含,因此未被压缩。通过添加相应的MIME类型即可解决该问题。

以下为操作步骤:

  • 在IIS管理界面进入目标网站的配置编辑界面
  • 选择httpCompression配置
  • 进入dynamicTypes设置
  • 添加mimeType项,添加text/html; charset=utf-8
  • 保存配置并重启IIS服务
  • 通过上述步骤,我们可以确保RSS返回内容被正确压缩,从而有效降低带宽占用。

    转载地址:http://aehkz.baihongyu.com/

    你可能感兴趣的文章
    NN&DL4.1 Deep L-layer neural network简介
    查看>>
    NN&DL4.3 Getting your matrix dimensions right
    查看>>
    NN&DL4.8 What does this have to do with the brain?
    查看>>
    nnU-Net 终极指南
    查看>>
    No 'Access-Control-Allow-Origin' header is present on the requested resource.
    查看>>
    NO 157 去掉禅道访问地址中的zentao
    查看>>
    no available service ‘default‘ found, please make sure registry config corre seata
    查看>>
    no connection could be made because the target machine actively refused it.问题解决
    查看>>
    No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
    查看>>
    No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
    查看>>
    No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
    查看>>
    No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
    查看>>
    No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
    查看>>
    No module named 'crispy_forms'等使用pycharm开发
    查看>>
    No module named cv2
    查看>>
    No module named tensorboard.main在安装tensorboardX的时候遇到的问题
    查看>>
    No module named ‘MySQLdb‘错误解决No module named ‘MySQLdb‘错误解决
    查看>>
    No new migrations found. Your system is up-to-date.
    查看>>
    No qualifying bean of type XXX found for dependency XXX.
    查看>>
    No resource identifier found for attribute 'srcCompat' in package的解决办法
    查看>>