简体   繁体   English

gzip在开发服务器上可以工作吗?

[英]Does gzip work on the development server?

Does gzip work on the python development server for appengine? gzip在appengine的python开发服务器上可以工作吗? How can I test this in the future? 将来如何测试?

Note: I've used Firebug to look at my HTTP requests from the browser, and I see that Accept-Encoding is set to "gzip,deflate". 注意:我已经使用Firebug从浏览器查看我的HTTP请求,并且看到Accept-Encoding设置为“ gzip,deflate”。

to see if the server responds with gzip encoded headers look for 查看服务器是否以gzip编码的标头响应

Content-Encoding:gzip 内容编码:gzip

in the response headers 在响应头中

€: found this in their faq €:在其常见问题解答中发现

Google App Engine does its best to serve gzipped content to browsers that support it. Google App Engine尽其所能将压缩的内容提供给支持它的浏览器。 Taking advantage of this scheme is automatic and requires no modifications to applications. 利用该方案是自动的,不需要修改应用程序。

We use a combination of request headers (Accept-Encoding, User-Agent) and response headers (Content-Type) to determine whether or not the end-user can take advantage of gzipped content. 我们结合使用了请求标头(Accept-Encoding,User-Agent)和响应标头(Content-Type),以确定最终用户是否可以利用压缩后的内容。 This approach avoids some well-known bugs with gzipped content in popular browsers. 这种方法避免了流行浏览器中带有gzip压缩内容的一些众所周知的错误。 To force gzipped content to be served, clients may supply 'gzip' as the value of both the Accept-Encoding and User-Agent request headers. 为了强制提供压缩后的内容,客户端可以提供“ gzip”作为Accept-Encoding和User-Agent请求标头的值。 Content will never be gzipped if no Accept-Encoding header is present. 如果不存在Accept-Encoding标头,则永远不会压缩内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM