Welcome Guest, Not a member yet? Register   Sign In
compression problem and wrong MIMIC
#4

[eluser]John_Betong[/eluser]
[quote author="Dennis_gull" date="1251845707"]I didn't think about reading the comment above the option Tongue
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
&nbsp;
&nbsp;
&nbsp;


Messages In This Thread
compression problem and wrong MIMIC - by El Forum - 09-01-2009, 03:56 AM
compression problem and wrong MIMIC - by El Forum - 09-01-2009, 04:13 AM
compression problem and wrong MIMIC - by El Forum - 09-01-2009, 11:55 AM
compression problem and wrong MIMIC - by El Forum - 09-01-2009, 07:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB