HTTP Response Compression in a URL rewrite enabled IIS installation

转载 于 2012-11-09 16:20:12 发布 · 1.1k 阅读
· 0
· 0
文章标签:

#compression #iis #IIS #UrlRewrite

asp.net 专栏收录该内容
16 篇文章
订阅专栏

HTTP Response Compression in a URL rewrite enabled IIS installation

It is normally a good and recommended practice to enable HTTP Response Compression regardless of the server you use to host a site. Response Compression uses the available bandwidth more efficiently thus providing faster transmission times between compression-enabled browsers and the server. This, of course, means faster loading pages for the end user as well.

HTTP Compression in IIS 6.0 is pretty easy to set up. You can click  here for detailed instructions on how to do it.

I would like to note that IIS compression isn't perfect. I did see a case where it failed and it turned out to be because the content was not actually being served by the IIS instance, but it was being redirected to a Tomcat server which processed all the requests and sent them back to IIS.

This routing is achieved by using a Rewrite Engine Software— ISAPI Rewrite. There is one additional feature that is obtained by using this rewrite software and that is providing more relevant-looking links (sometimes known as short or fancy URL's) to the end user.

You may wonder why someone would ever use such a server configuration. There are many good reasons to do it; unfortunately they are out of the scope of this blog.

However, if you ever run into a similar situation, I suggest you keep reading this blog. It may save you some time in setting your Response Compression to work appropriately.

 


Compression Tools


There are a lot of third party tools you can use for Response Compression in IIS like: httpZip, XCompress, Helicon Jet, etc. Most of them are implemented as an ISAPI filter you can add to IIS and use with no trouble at all.

I decided to use Helicon Jet as our compression tool. Installation is really simple, just download and run HeliconJet.msi. After installation completes you will find a Helicon Jet Tab under site properties in the IIS console.

Helicon Jet is configured separately for every web site in IIS. Its settings are accessible through IIS console snap-in extension among the other web site properties. You can access the console by opening a run window from the start menu and typing inetmgr.

Helicon Jet comes pre-configured for the most system configurations so you may start using compression immediately after enabling it. When you click on the Enable button the '/' entry will be automatically added to the Directory (URL) pattern list, which will enable compression on entire web site. By default compression is enabled for both static and dynamic content, but server side caching is enabled only for static content and compression level for dynamic content is lower.

There are a lot of options you can set in the Helicon Jet properties tab. Helicon Jet is configured on three different levels:

  • Directory & file level configuration
  • File extension & MIME type level configuration
  • User agents level configuration

I recommend that you take a look at the documentation that comes along with the product to find out what the different options are best used for. However, I suggest enabling file compression for the following file types:

Static Content
  • HTML Pages (.html)
  • Cascading Style Sheets (.css)
  • Java Script Code (.js)
  • HTML Components (.htc)
  • Portable Document Format (.pdf)  
Dynamic Content
  • ASP Pages (.asp)
  • ASPX Pages (.aspx)
  • ASMX Pages (.asmx)
  • Dynamic Link Libraries (.dll)
  • Executable files (.exe)
  • PHP Pages (.php)


Below is a table with some data that I obtained by running tests on our site.
A tool called Fiddler was used to monitor and see the HTTP requests and responses.

File

Compression Disabled [bytes]

Compression Enabled [bytes]

Compression Ratio [%] 

home.html

18,512

3,478

81.2

query.js

197,156

54,034

72.6

global.css

76,640

15,184

80.2

global.js

37,256

10,430

72.0



That is it for now.  In the next blog I will address the issue of connecting IIS with Tomcat using an Apache proprietary protocol called AJP13 instead of HTTP.

确定要放弃本次机会?
福利倒计时
: :

立减 ¥

普通VIP年卡可用
立即使用
ChesterQin
关注 关注
  • 0
    点赞
  • 踩
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
  • 分享
    复制链接
    分享到 QQ
    分享到新浪微博
    扫一扫
  • 举报
    举报
专栏目录
参与评论 您还未登录,请先 登录 后发表或查看评论
ChesterQin

博客等级

码龄17年
35
原创
8
点赞
8
收藏
9
粉丝
关注
私信

热门文章

  • 双方拍拍肩,双方打屁股 14676
  • 大数据量下not in, not exists, left join的比较 8773
  • wmplayer参数说明 7001
  • sql取中间连续记录的方法例如去20条到30条的记录 6983
  • Preview image in client by JavaScript when upload image in multi-browsers 4365

分类专栏

  • asp.net
    16篇
  • css兼容
    2篇
  • ie兼容
    3篇
  • javascript
    17篇
  • MVC asp.net
    9篇
  • NHibernate
    8篇
  • web
    15篇
  • Web Design
  • 数据库
    8篇
  • 架构
  • 理
    13篇
  • 移动开发
    1篇

展开全部 收起

上一篇:
IIS6下.net伪静态html图文教程
下一篇:
老鸟,也会坠机

最新评论

  • ASP.NET MVC – Create easy REST API with JSON and XML(转)

    Smark_du: 看着真尼玛费劲

  • How to fix the issue: An error occurred while validating. HRESULT = '80004005'

    霜之咏叹调: 你的方法对我无效,还是去stackoverflow上找到一个能用的。 分享一下链接http://stackoverflow.com/questions/8648428/an-error-occurred-while-validating-hresult-8000000a 具体的解决方案是: open your setup project file (.vdproj) in notepad (or any other text editor) delete these lines at a beginning of the .vdproj file: "SccProjectName" = "8:" "SccLocalPath" = "8:" "SccAuxPath" = "8:" "SccProvider" = "8:" build again - error is gone

  • Preview image in client by JavaScript when upload image in multi-browsers

    dotnba: 好文章...

  • js继承 转帖

    likun87001368: [e03]

大家在看

  • 京东拉码所有
  • 基于springboot高校就业招聘系统 121
  • 基于springboot的车辆违章信息管理系统 40
  • 基于springboot的高校电动车租赁系统

最新文章

  • NHibernate OneToOne 映射下使用延迟加载
  • Running NHibernate3.3&CouchBase successfully
  • 未能加载文件或程序集“NHibernate.ByteCode.Castle”或它的某一个依赖项。系统找不到指定的文件
2013年6篇
2012年2篇
2011年27篇
2010年15篇
2009年27篇

目录

展开全部

收起

目录

展开全部

收起

上一篇:
IIS6下.net伪静态html图文教程
下一篇:
老鸟,也会坠机

分类专栏

  • asp.net
    16篇
  • css兼容
    2篇
  • ie兼容
    3篇
  • javascript
    17篇
  • MVC asp.net
    9篇
  • NHibernate
    8篇
  • web
    15篇
  • Web Design
  • 数据库
    8篇
  • 架构
  • 理
    13篇
  • 移动开发
    1篇

展开全部 收起

目录

评论
被折叠的  条评论 为什么被折叠? 到【灌水乐园】发言
查看更多评论
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值