使用 django-nonrel 的 Google App Engine 中的 GZIP 内容

发布于 2024-10-07 10:26:45 字数 701 浏览 0 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忆悲凉 2024-10-14 10:26:46

Gzip 应该开箱即用,您可能通过代理请求该页面。

Gzip should work out of the box, you are probably requesting the page through a proxy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文