如何启用keep-alive? [英] How can I enable keep-alive?

查看:207
本文介绍了如何启用keep-alive?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行了一个Google Page Speed,它说我得分为 57/100 ,因为我需要启用Keep-Alive和启用压缩。我做了一些Google搜索,但我找不到任何东西。我甚至与我的域名提供商联系,要求他们打开它,但他们说它已经开始了。

I ran a Google Page Speed and it says I scored 57/100 because I need to "Enable Keep-Alive" and "Enable Compression". I did some Google searches but I can't find anything. I even contacted my domain provider and asked them to turn it on, but they said it was already on.

长故事:

1。)什么是Keep-Alive?

1.) What is Keep-Alive?

2。)如何启用?

推荐答案

Keep-alive为HTTP会话使用相同的tcp连接,而不是为每个新请求打开新的会话。您基本上需要在HTTP响应中设置HTTP标头

Keep-alive is using the same tcp connection for HTTP conversation instead of opening new one with each new request. You basically need to set HTTP header in your HTTP response

Connection: Keep-Alive

阅读更多这里

这篇关于如何启用keep-alive?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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