Re: Detect and Redirect Mobile Users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Jun 13, 2013 at 1:19 AM, dealTek <dealtek@xxxxxxxxx> wrote:

> Hi all,
>
> I'm curious of a simple, common, universal way to detect a mobile user so
> I can redirect them to a mobile directory...
>
> What is best for this: Javascript - CSS - PHP?
>
> I think for my purposes if I can detect screen size or mobile browser
> agent - that would be good enough for what I need right now.
>
> Thanks in advance - Dave
>
>
In my personnal experiences, I've used varnish (for caching mainly) and
for mobile redirection purpose. A few line in your vcl configuration and
there you go. You can even put a rules to indicate that if there is a GET
parameter or a cookie, you don't redirect the user.
It means that you can simply add a link on your mobile website to send
the user back on the desktop website if he prefers.

I like this approach as it is directly on your first frontend (or load
balancer) and you don't even need to load you php app to redirect the
user.

Regards,
--
bacardi55 (bacardi55.org)

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux