我使用这个PHP代码的JSON输出。 apache默认是gzip吗?或者,我怎样才能确认?默认情况下是否输出Apache 2 gzip json?
header('Content-type: application/json');
header('Cache-Control: max-age=0,no-cache,no-store,post-check=0,pre-check=0');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
echo json_encode($response);
我相信这是你在找什么。 http://www.simonwhatley.co.uk/how-to-configure-apache-to-gzip-your-components –