如何压缩HTTP响应头? [英] How to compress HTTP response headers?

查看:178
本文介绍了如何压缩HTTP响应头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Velocity 2010大会上, Google表示,标头压缩可以带来很大的收获

At the Velocity 2010 conference, Google said that header compression can yield big gains:


Hölzle注意到网页处理效率低下页面标题,提供有关用户IP地址,浏览器和其他会话数据的信息。平均网页对不同资源进行44次调用,其中许多请求包括重复的头数据。 Holzle说压缩头文件可以为一些主要网站提供88%的页面加载。

Hölzle noted a glaring inefficiency in the handling of web page headers, which provide information about a user’s IP address, browser and other session data. The average web page makes 44 calls to different resources, with many of those requests including repetitive header data. Holzle said compressing the headers produces an 88 percent page load improvement for some leading sites.

如何确保响应头Web服务器是否被压缩?

How does one ensure that the response headers sent by the web server are compressed? Is this even possible with today's technology?

推荐答案

HTTP请求头或响应头压缩不符合HTTP 1.1标准。

Having HTTP request headers or response headers compressed is not HTTP 1.1 standards compliant.

这里说的是对这样一个计划的一些分析:

That being said here is some analysis into how such a scheme could be made:

1)也许他们意思是你可以使用一些其他自定义的http方案,如 httpc://

1) Maybe they mean you can accomplish that using some other custom http scheme, like say httpc://.

声明向/从同一服务器批量发送请求和响应5增加了web的速度。我调用这个方案 httpBrian://

I could also make a claim that sending requests and responses to/from the same server in batches of 5 increases the speed of the web as well. I call this scheme httpBrian://.

2)如果你假设他们只意味着HTTP响应头,请求标头可以有另一个标头,指定您希望响应作为不符合HTTP的响应。我想这将有问题代理等等。

2) If you assume they mean only HTTP response headers, in the request headers you could have another header which specifies that you want the response in as a non compliant HTTP response. I imagine this would have problems with proxies and etc. though.

3)如果您假设它们只是PARTIAL HTTP响应头,那么HTTP服务器可以将非直接重要的非代理头添加到执行请求压缩到另一个头。 HTTP请求将启用此类功能。这很可能是他们想要完成的。

3) If you assume they mean only PARTIAL HTTP response headers, then the HTTP server could put the non proxy headers that are not immediately important except to the http client performing the request compressed into another header. The HTTP request would enable such a feature. This is most likely what they are trying to accomplish.

这篇关于如何压缩HTTP响应头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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