[eluser]John_Betong[/eluser]
[quote author="Dennis_gull" date="1251845707"]I didn't think about reading the comment above the option
Thanks for pointing this out..
Any ideas on the second issue?[/quote]
For your first point I stumbled upon this code from some knowledgeable code/poster.
It solved one of my problems:
Code:
if (LOCALHOST) // DO NOT compress $result
{
// DO NOT COMPRESS
}else{
// display in view
$_SESSION['zzz_before'] = strlen($result);
$search = array
(
'/\>[^\S ]+/s', //strip whitespaces after tags, except space
'/[^\S ]+\</s', //strip whitespaces before tags, except space
'/(\s)+/s' // shorten multiple whitespace sequences
);
$replace = array
(
'>',
'<',
'\\1'
);
$result = preg_replace($search, $replace, $result);
$result .= sprintf('%6.3f', $_SESSION['zzz_after'] / $_SESSION['zzz_before']) ;
// display in view
$_SESSION['zzz_after'] = strlen($result);
}//endcompress