httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Johnson <...@indietorrent.org>
Subject Re: [users@httpd] output compression when host has disabled mod_deflate, mod_gzip and php_value auto_prepend_file
Date Fri, 21 Sep 2012 18:17:01 GMT


On 9/21/2012 12:44 PM, edward eric pedersson wrote:
> Thanks for your response Ben.

Sure!

> I did mean the user-agent caching. I guess I can control this using the
> PHP header output and hope the user-agent respects the header.
> 
> Penalties or benefits, depends which way you look at it I guess ;-)
> 
> Essentially I need to compare the cost of the two statements below
> assuming a 20K - 50K file
> 
> <link rel="stylesheet"
> type="text/css" href="http://my.domain.com/stylesheet.php?file=/path/to/stylesheet.css"/>
> <link rel="stylesheet"
> type="text/css"href="http://my.domain.com/path/to/stylesheet.css
> <http://my.domain.com/stylesheet.php?file=/path/to/stylesheet.css>"/>
> 
> The first one uses a PHP file to get output compression (as described in
> my previous email - simply loading the file and returning it with
> compression using ob_gzhandler).
> The second does the usual.
> 
> All things being equal, which one will load faster?

I'll be surprised if anyone is able to provide an authoritative answer
here. There are a number of factors that contribute to how PHP performs
in a given environment. You may just have to benchmark it.

That said, I suspect that using PHP to gzip the stylesheets will yield a
faster page-load time than not compressing them at all, given the
file-sizes you describe.

> I can try and get a few tests running but I will hold off in case anyone
> here knows already.

Please do share the results if you elect to perform benchmarking. I'm
curious :).

Thanks,

-Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message