Re: Idea to php: client-speed, on server
| From: | Jonah H. Harris | Date: | Fri, 17 Oct 2014 13:50:35 +0000 |
| Subject: | Re: Idea to php: client-speed, on server | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-78139@lists.php.net to get a copy of this message | ||
On Fri, Oct 17, 2014 at 9:26 AM, Rasmus Lerdorf <rasmus@lerdorf.com> wrote:
> On Oct 17, 2014, at 05:21, Uve Vesterbrandt <uve@vesterbrandt.dk> wrote:
> > *_We would be grateful_*
> > Can anybody follow our idea? We, as a group mighty like a response to
> this.
> > If anyone has some general ideas for possible solution, it would be
> funand helpfull, but our current project, however, only reveal whether the
> idea is workable.
> > If you know other people who would be more obvious to submit it to, we
> would be grateful to you forwarded or disclosed to who it could be.
>
> This isn't really feasible, and even if it was, PHP would have nothing to
> do with it. If the web server was able to determine the client speed and
> set a server variable then PHP without any modifications would provide it
> via $_SERVER['CLIENT_SPEED']. But there is no way the web server can
> determine this on its own. The only way for this to be feasible would be if
> the mobile browsers were to send the current connection speed as part of
> their USER_AGENT header or in some different header. So you should be
> asking Apple and Google, not us.
>
Agreed with Rasmus. This doesn't belong *in* PHP. But, as long as you can
detect the speed, it would be easy to set an environment variable for or
develop a framework for apps to take it into account. Likewise, the
following sounds remarkably familiar to what you're talking about;
hopefully it helps:
http://www.quirksmode.org/blog/archives/2012/10/measuring_conne.html
--
Jonah H. Harris
Blog: http://www.oracle-internals.com/