如何使用 Rails gzip 网页输出? [英] How do I gzip webpage output with Rails?

查看:18
本文介绍了如何使用 Rails gzip 网页输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gzips 我的网页输出的最好的 Rails 插件是什么?

What is the best plugin for Rails that gzips my webpage output?

我托管的公司表示他们不会安装 mod_deflate.

The company I am hosting with has stated they will not install mod_deflate.

推荐答案

除非您在没有其他网络服务器的情况下运行 Rails 应用程序(这通常不是一个好主意),否则您可能应该查看您的网络服务器.所有主要的网络服务器都有启用 gzip 的选项.例如,对于 Apache,您可以使用 mod_deflate.

Unless you are running your Rails application without another webserver (which usually isn't a great idea), you should probably look at your webserver. All major webservers have options to enable gzip. For example, for Apache, you can use mod_deflate.

这篇关于如何使用 Rails gzip 网页输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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