Newsgroups: php.general,php.internals Path: news.php.net Xref: news.php.net php.general:325691 php.internals:95466 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21047 invoked from network); 27 Aug 2016 19:05:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Aug 2016 19:05:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=rene.veerman.netherlands@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rene.veerman.netherlands@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.181 as permitted sender) X-PHP-List-Original-Sender: rene.veerman.netherlands@gmail.com X-Host-Fingerprint: 209.85.220.181 mail-qk0-f181.google.com Received: from [209.85.220.181] ([209.85.220.181:33994] helo=mail-qk0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/06-34481-E54E1C75 for ; Sat, 27 Aug 2016 15:05:02 -0400 Received: by mail-qk0-f181.google.com with SMTP id t7so105761174qkh.1; Sat, 27 Aug 2016 12:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RFHxx2qLOq6GhR3EWyXK+SejD89SOB/0rDk6onRU+6U=; b=BETrTZ+N3zUeW73Cp8R+j8NqHNRtR0BtkIprWZu02gskq4H0BGAj/Y1v7WPBeCQTgO fjtuGwtsL1/DqBS7tqFwgvWGURX4ELTzLqnZDXP6Gi6kzR60rUqSm7lAe6etGkHu7s9c RY4ay8DZ4HDC37XveToTtz0+kCaGCjMwGo5Nu84EyVwkHD4tPtvI6Pxb8vgLwLBtpQq+ oXUquKPenwRr3ABfZD2dWYs4qAl4G4BIRrj2qZwf3e4440Zlq4uqDh+Uz+q1SRfLYYiA UYD+IiGvlun7K+2sH0VD/PqQS9MrHLBGeJGkC31vJ9NEVXhvvYO6ek+wdfMv08AotkTY Kapg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RFHxx2qLOq6GhR3EWyXK+SejD89SOB/0rDk6onRU+6U=; b=Db16Nzyqpx/cOZa92M9+3XjKAf1xKTGqxXbWOWnkvhVl7wKFNEAh1Ym+Umf5NgCNM0 JcdK8Y8U2b5Ah5QMHr0QVFZ4uV7NFG5ZVBaHnCvsM8ftkxrCyi2V6SinUQnsKK7QKfCP zUcU4/S9gmChPCNFi5/GEtLyws8kwrBaBesUb1FIuNQITbN70k5Dsb9cvM+Yq9gOYR7J +aKfIlfVh+L0QAN3u5R9sTE7qfoSKX0uUp0fLfBfAA6YifZCTbqq9KvAx6Isr+euM+ez Re1hYrQlfT4Za4+wHy+ovdxe8TGDbJ5hNPHs+ZvkTuGy8H30t8U8NYt6v8/WfGogYokQ C33A== X-Gm-Message-State: AE9vXwPW2vRq9kTFC7I1ad2JWDWbtmIT3Vi6QFAbwNlkNHFmoJoHfkuK7GE4bez8HMsn79ydD550x8BMdmsbxg== X-Received: by 10.55.24.105 with SMTP id j102mr10127865qkh.165.1472324699175; Sat, 27 Aug 2016 12:04:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.52.68 with HTTP; Sat, 27 Aug 2016 12:04:38 -0700 (PDT) In-Reply-To: <33E6F0A8-A14B-4590-A18C-FF6D6E029D0A@gmail.com> References: <5E615A59-AC2B-455F-9438-D295419F3767@ashleysheridan.co.uk> <33E6F0A8-A14B-4590-A18C-FF6D6E029D0A@gmail.com> Date: Sat, 27 Aug 2016 21:04:38 +0200 Message-ID: To: Joshua Kehn Cc: Ashley Sheridan , php-general@lists.php.net, internals@lists.php.net Content-Type: multipart/alternative; boundary=001a1142e54cb06f2a053b124e03 Subject: Re: [PHP] feature request : gzip caching From: rene.veerman.netherlands@gmail.com (Rene Veerman) --001a1142e54cb06f2a053b124e03 Content-Type: text/plain; charset=UTF-8 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 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 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 >> 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. > >> > --001a1142e54cb06f2a053b124e03--