Re: feature request : gzip caching
| From: | Joshua Kehn | Date: | Sat, 27 Aug 2016 19:36:27 +0000 |
| Subject: | Re: feature request : gzip caching | ||
| References: | 1 2 3 4 5 | Groups: | php.general php.internals |
| Request: | Send a blank email to php-general+get-325693@lists.php.net to get a copy of this message | ||
Apache handles gzipping just fine. http://httpd.apache.org/docs/current/mod/mod_deflate.html
> and my PHP handles static file serving only when needed, when evaluating content and js for
> specific URLs
I'm not sure why that would be required. Why doesn't the HTML reference the assets
required directly?
> and for noobish developers it might be very convenient to add this to php readfile() afterall
Convenient and right are often two different ways to solve a problem. I try to not offer convenient
solutions that are not right.
--jk
> On Aug 27, 2016, at 3:04 PM, Rene Veerman <rene.veerman.netherlands@gmail.com> wrote:
>
> yea ok.. "something upstream".. is that nginx easy to stack above / next to / under
> apache2? i'm really used to apache2..
> and for noobish developers it might be very convenient to add this to php readfile() afterall..
>
> and my PHP handles static file serving only when needed, when evaluating content and js for
> specific URLs to fit in a common HTML site template for instance..
> you know of a better way? i'm all ears :)
>
>> On Sat, Aug 27, 2016 at 9:00 PM, Joshua Kehn <josh.kehn@gmail.com> wrote:
>> Why is PHP handling static file serving? This is squarely outside of it's domain. Have
>> nginx or something upstream handle gzipping content.
>>
>> --jk
>>
>> > On Aug 27, 2016, at 1:22 PM, Rene Veerman <rene.veerman.netherlands@gmail.com>
>> > wrote:
>> >
>> > eh no, i'm a big fan of caching output in js / json cache files :)
>> > but those still need to get gzipped... not just my main JS file, also my
>> > photoalbum contents -> another 1Mb of JSON content...
>> >
>> > On Sat, Aug 27, 2016 at 7:19 PM, Ashley Sheridan <ash@ashleysheridan.co..uk>
>> > wrote:
>> >
>> >>
>> >>
>> >> On 27 August 2016 17:52:48 BST, Rene Veerman <rene.veerman.netherlands@
>> >> gmail.com> wrote:
>> >>> Hi..
>> >>>
>> >>> First off, i love PHP. Many thanks for keeping it free too.
>> >>>
>> >>> However, i've noticed that gzipping the 1Mb of javascript that my
>> >>> seductiveapps.com needs, takes a relatively long time (measured over a
>> >>> total page load time which i'd like to bring down from it's current
>> >>> 10
>> >>> seconds, about a second or even more is spent gzipping (by a core i5
>> >>> machine))..
>> >>
>> >> Are you building the js each time it's requested? Have you thought about
>> >> building it as a deployment step for production?
>> >>
>> >>>
>> >>> At one time, i spent time building PHP code that cached the
>> >>> already-gzipped
>> >>> content and outputted that with just readfile().. But i never got it to
>> >>> work a second time, unfortunately..
>> >> Why don't you want the web server to handle the gzip side of things? It
>> >> would make more sense surely?
>> >>
>> >>> Could you pretty please add this to the core of PHP? Shouldn't be that
>> >>> hard
>> >>> for the internals team right?..
>> >>>
>> >>> Many thanks in advance for even considering to do this..
>> >>>
>> >>> with regards,
>> >>> Rene Veerman,
>> >>> CEO + CTO of seductiveapps.com
>> >>
>> >> --
>> >> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>> >>
>