优化运行IIS7的Windows Server 2008盒子以仅提供静态文件的最佳方法是什么? [英] What is the best way to optimize a Windows Server 2008 box running IIS7 to serve only static files?

查看:147
本文介绍了优化运行IIS7的Windows Server 2008盒子以仅提供静态文件的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我们的Web应用程序从运行Windows Server 2008和IIS7的静态文件服务器中提取静态内容(css,js,images)。

I would like to have our web applications pull static content (css, js, images) from a static file server running Windows Server 2008 and IIS7.

什么类型为了这个目的,你会对服务器进行优化吗?

What sort of optimizations would you make to the server for this single purpose?

(Machine.config更改?Web.config更改?特殊IIS7设置或模块?什么?)

(Machine.config changes? Web.config changes? Special IIS7 setup or modules? What?)

推荐答案

一些建议:

  • Enable gzip compression: http://blogs.msdn.com/vivekkum/archive/2009/02/18/http-compression-in-iis-6-and-iis-7-using-service-account.aspx
  • Set Cache-Control: max-age to 31536000 (1 year). code.google.com will tell you why --> http://code.google.com/speed/page-speed/docs/caching.html. This link will tell you how --> http://consultingblogs.emc.com/jonathangeorge/archive/2009/09/09/how-to-improve-your-yslow-score-under-iis7.aspx

这篇关于优化运行IIS7的Windows Server 2008盒子以仅提供静态文件的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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