Jump to content

headers


ngreenwood6

Recommended Posts

A VERY basic idea would be to use ob_gzhandler

like this,

<?php ob_start("ob_gzhandler"); ?>
<html>
<body>
<p>This should be a compressed page.</p>
</html>
<body>

however now all browsers will accept (unzip it), so adding a check maybe an idea

<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>

Link to comment
https://forums.phpfreaks.com/topic/181796-headers/#findComment-958818
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.