Newsgroups: php.general,php.internals Path: news.php.net Xref: news.php.net php.general:325693 php.internals:95467 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27927 invoked from network); 27 Aug 2016 19:36:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Aug 2016 19:36:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=josh.kehn@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=josh.kehn@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.174 as permitted sender) X-PHP-List-Original-Sender: josh.kehn@gmail.com X-Host-Fingerprint: 209.85.220.174 mail-qk0-f174.google.com Received: from [209.85.220.174] ([209.85.220.174:35425] helo=mail-qk0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/77-34481-0CBE1C75 for ; Sat, 27 Aug 2016 15:36:34 -0400 Received: by mail-qk0-f174.google.com with SMTP id v123so106194630qkh.2; Sat, 27 Aug 2016 12:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=7yDL+Yzmybd7GLsLf8SwwDRDogsnp9MixyS1WO8tw4E=; b=pK43GxrNkZS15ABsbV/spOqrI1pfPwpFg5QQcwSbxPQQfumLNAakZskU/Xh0jHQ1Ya gJjL9df82GJS3IjphY205Z8r+hl8zOD06NElyI6vRWsRFaMdbx8tWhjIslODZ5EwVeZi K2hW06dJllnvZHjoXSVcgc4hf9QvMFCgRznJkCzqcDUdS7ciBqqN6Bk1weY9l1G2wwma O/xv7KqtmGGndgvOwBFwnuSXYtQ+oJEHWjCFHGm03trbgA2UeaBf0LeK1rBnWnTW09eL QvwsykO9Qt1Tvti40jvxrAPH/TMWgqh3nYcOO90IlWzT8OAvaasEiSVFOcpCtHP7oKqQ b/ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=7yDL+Yzmybd7GLsLf8SwwDRDogsnp9MixyS1WO8tw4E=; b=MeWEUvM3BdNn5kW6esBg9hNtAxZVY8bOY0P9eKCtzGk6ZUVLeyweSmKcwvx05c3Aly c2GRP70nQM8hkpMjmJBPox2uMiaHoeaFH06dZUT3XQDoqXjDB1ED4xquA8YtQ0JVxvyV wbNLWFfJBF2WNllzECwqm1yoyzgB0buVlMmxbi02YMj+OMONJZ0V7wMt0lkQuOlcNzkn 9AtfnYEpAQ6RXCJjzQ2iiAHSiF4fFMk/uhJXverAfX4HrG2KNKaVMI3+2Wox36M2vjSz qkwvluuObkLK5EM56GToQ11sac5HlmCSOU3/DJQn0glDBW1QPulgqpCRnAr2xvOgpfeH LcKw== X-Gm-Message-State: AE9vXwNehZ6OnZBCtdg992J6fZi4e5Le6jVuvy1cKh+NlAXtjtkT1vocwYfBed4SLHFfGg== X-Received: by 10.55.45.1 with SMTP id t1mr10758957qkh.182.1472326589771; Sat, 27 Aug 2016 12:36:29 -0700 (PDT) Received: from [192.168.7.22] (pool-98-116-189-7.nycmny.fios.verizon.net. [98.116.189.7]) by smtp.gmail.com with ESMTPSA id f62sm13765542qka.3.2016.08.27.12.36.28 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 27 Aug 2016 12:36:28 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-107B1CA3-7B6C-4D82-9E12-4406E590F918 Mime-Version: 1.0 (1.0) X-Mailer: iPhone Mail (13G36) In-Reply-To: Date: Sat, 27 Aug 2016 15:36:27 -0400 Cc: Ashley Sheridan , php-general@lists.php.net, internals@lists.php.net Content-Transfer-Encoding: 7bit Message-ID: <3B285FFA-4C62-421D-A5B5-E5F205C53C02@gmail.com> References: <5E615A59-AC2B-455F-9438-D295419F3767@ashleysheridan.co.uk> <33E6F0A8-A14B-4590-A18C-FF6D6E029D0A@gmail.com> To: Rene Veerman Subject: Re: [PHP] feature request : gzip caching From: josh.kehn@gmail.com (Joshua Kehn) --Apple-Mail-107B1CA3-7B6C-4D82-9E12-4406E590F918 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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 c= ontent and js for specific URLs I'm not sure why that would be required. Why doesn't the HTML reference the a= ssets required directly? > and for noobish developers it might be very convenient to add this to php r= eadfile() afterall Convenient and right are often two different ways to solve a problem. I try t= o not offer convenient solutions that are not right.=20 --jk > On Aug 27, 2016, at 3:04 PM, Rene Veerman wrote: >=20 > yea ok.. "something upstream".. is that nginx easy to stack above / next t= o / under apache2? i'm really used to apache2.. > and for noobish developers it might be very convenient to add this to php r= eadfile() afterall.. >=20 > and my PHP handles static file serving only when needed, when evaluating c= ontent and js for specific URLs to fit in a common HTML site template for in= stance.. > you know of a better way? i'm all ears :) >=20 >> 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. >>=20 >> --jk >>=20 >> > On Aug 27, 2016, at 1:22 PM, Rene Veerman 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 m= y >> > photoalbum contents -> another 1Mb of JSON content... >> > >> > On Sat, Aug 27, 2016 at 7:19 PM, Ashley Sheridan >> > 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 1= 0 >> >>> 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 abo= ut >> >> 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 t= o >> >>> work a second time, unfortunately.. >> >> Why don't you want the web server to handle the gzip side of things? I= t >> >> would make more sense surely? >> >> >> >>> Could you pretty please add this to the core of PHP? Shouldn't be tha= t >> >>> 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. >> >> >=20 --Apple-Mail-107B1CA3-7B6C-4D82-9E12-4406E590F918--