使用 django-nonrel 的 Google App Engine 中的 GZIP 内容
我有一个 django-nonrel 应用程序在 Google App Engine 中运行,并且希望对所有内容进行 gzip 压缩。
我一直读到 GAE 自动对内容进行 gzip 压缩,但是当我使用 Firefox 的 Web 开发人员工具栏检查标头时,我得到以下结果:
Via: 1.1 TL-ISA1 Connection: Keep-Alive Proxy-Connection: Keep-Alive Transfer-Encoding: chunked Expires: Thu, 09 Dec 2010 12:23:46 GMT Date: Thu, 09 Dec 2010 12:23:46 GMT Content-Type: text/html; charset=utf-8 Etag: "463ad22512f09050f76a291c11d9746d" Server: Google Frontend Last-Modified: Thu, 09 Dec 2010 12:23:46 GMT Cache-Control: max-age=0 200 OK
我本来希望看到 Content-Encoding: gzip,但因为它不存在,我的假设是内容没有按应有的方式进行 gzip 压缩。
我错过了什么吗?例如,如果我使用 django-nonrel,我需要做一些额外的事情吗?
补充一点,我是 Web 开发的新手 - 所以不要害怕光顾。谢谢
I have a django-nonrel app running in Google App Engine and am wanting all the content to be gzipped.
I keep reading that GAE automatically gzips the content but when I check the headers using Firefox's web developer toolbar I get the following result:
Via: 1.1 TL-ISA1 Connection: Keep-Alive Proxy-Connection: Keep-Alive Transfer-Encoding: chunked Expires: Thu, 09 Dec 2010 12:23:46 GMT Date: Thu, 09 Dec 2010 12:23:46 GMT Content-Type: text/html; charset=utf-8 Etag: "463ad22512f09050f76a291c11d9746d" Server: Google Frontend Last-Modified: Thu, 09 Dec 2010 12:23:46 GMT Cache-Control: max-age=0 200 OK
I was expecting to see Content-Encoding: gzip, but since it is not there, my assumption is that the content is not being gzipped as it should.
Am I missing something? For example, do I need to do something extra if I am using django-nonrel?
Just to add, I am new to Web development - so don't be afraid to patronise. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Gzip 应该开箱即用,您可能通过代理请求该页面。
Gzip should work out of the box, you are probably requesting the page through a proxy.