Skip to content

Latest commit

 

History

History
82 lines (70 loc) · 3.02 KB

(1.2)雅虎军规-服务器部分.md

File metadata and controls

82 lines (70 loc) · 3.02 KB

title: (1.2)雅虎军规-服务器部分 speaker: 刘正午 url: https://github.com/midday/WPO-Yahoo transition: slide3 files: /js/zoom.js theme: moon usemathjax: yes

[slide]

雅虎军规-服务器部分

<iframe src="http://ghbtns.com/github-btn.html?user=midday&repo=WPO-Yahoo&type=watch&count-true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20" style="width:110px;height:20px; background-color: transparent;"></iframe><iframe src="http://ghbtns.com/github-btn.html?user=midday&repo=WPO-Yahoo&type=fork&count=false" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20" style="width:110px;height:20px; background-color: transparent;"></iframe><iframe src="http://ghbtns.com/github-btn.html?user=midday&repo=WPO-Yahoo&type=follow&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="170" height="20" style="width:170px;height:20px; background-color: transparent;"></iframe>

[slide]

服务器部分

- 使用 CDN 缓存
- Gzip 压缩传输文件
- 添上 Expires 或者 Cache-Control HTTP 头
- 配置ETags
- 避免空的图片 src
- 尽早 flush 输出
- 对 Ajax 使用 GET 请求

[slide] [magic data-transition="cover-circle"]

服务器部分 -使用 CDN

====

what are the CDN ?

CDN的全称是 Content Delivery Network,即内容分发网络。

施主,给个图呗...

====

CDN工作原理

why use the CDN ?

  • 用户与服务器的物理距离响应时间也有影响。把内容部署在多个地理位置分散的服务器上能让用户更快地载入页面。 ====

使用 CDN 缓存哪些内容? {:&.flexbox.vleft}

一般用来缓存静态资源

原因:终端用户80%到90%的响应时间都花在下载页面组件上:图片,样式,脚本,Flash等等。

CDN 在[国美在线]的应用

目前使用的 CDN 厂家是 网宿 [/magic]

[slide] [magic data-transition="cover-circle"]

Gzip 压缩传输文件

详细内容请参考:

(2)番外篇-Nginx的基本使用&服务器优化配置.md

====

Gzip 在[国美在线]的应用

[/magic]

[slide] [magic data-transition="cover-circle"]

添上 Expires 或者 Cache-Control HTTP 头

详细内容请参考:

(2)番外篇-Nginx的基本使用&服务器优化配置.md

====

Expires 和 Cache-Control HTTP 头在[国美在线]的应用

[/magic]

[slide] [magic data-transition="cover-circle"]

配置ETags

详细内容请参考:

(2)番外篇-Nginx的基本使用&服务器优化配置.md

====

ETags 在[国美在线]的应用

[/magic]