Mercurial > SimpleWebPresenter
comparison Page.inc @ 116:374e3eff07fd
Branch merge
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Thu, 17 Mar 2016 22:34:49 +0100 |
| parents | adf7b11921f4 |
| children | df158368051e |
comparison
equal
deleted
inserted
replaced
| 115:b9668126e52e | 116:374e3eff07fd |
|---|---|
| 108 * | 108 * |
| 109 * @return bool if this page may be compressed | 109 * @return bool if this page may be compressed |
| 110 */ | 110 */ |
| 111 function mayCompress() | 111 function mayCompress() |
| 112 { | 112 { |
| 113 if (COMPRESSION_DISABLED) | |
| 114 return false; | |
| 113 //We want to add the variant even if we don't serve with compression. | 115 //We want to add the variant even if we don't serve with compression. |
| 114 $this->addVariant('Accept-Encoding'); | 116 $this->addVariant('Accept-Encoding'); |
| 115 if (!array_key_exists('HTTP_ACCEPT_ENCODING', $_SERVER)) | 117 if (!array_key_exists('HTTP_ACCEPT_ENCODING', $_SERVER)) |
| 116 return false; | 118 return false; |
| 117 return (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')); | 119 return (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')); |
