Re: State of the art in browser capability detection
Re: State of the art in browser capability detection
- Subject: Re: State of the art in browser capability detection
- From: Samuel Pelletier <email@hidden>
- Date: Wed, 15 Oct 2014 16:39:48 -0400
Hi,
If you just want to switch between different user interfaces based on the screen size, you only need a small javascript on your landing page like this one that put a value like 1024X768 in a hidden form field:
document.getElementById('screenSizeField').value = screen.width + "X" + screen.height;
I use this one in a login form to gated stats about screen sizes used. ERXBrowser will extract info from the user agent but screen size is only available to javascript.
You can use a similar technique to pass a get param in redirect for example.
Samuel
Le 2014-10-15 à 08:20, Markus Stoll, junidas GmbH <email@hidden> a écrit :
> Hi,
>
> where possible, I switched to feature detection using
>
> http://modernizr.com
>
> This depends on a small javascript library running on your page.
>
> Markus
>
>> Am 15.10.2014 um 05:30 schrieb Paul Hoadley <email@hidden>:
>>
>> Hi David,
>>
>> On 15 Oct 2014, at 11:25 am, David Holt <email@hidden> wrote:
>>
>>> We're beginning to tackle just this problem. One helpful site is http://www.whatismybrowser.com and has an API available, but I'm not sure that it does anything different than you could do in WO. We use it in a support context to tell people whether they are running a browser considered out of date and gives instructions for how to update, turn on JavaScript etc. I've realized since, though that it is quite laptop/desktop centric since a quick download will not be the solution to upgrade a browser on mobile devices.
>>
>> Thanks I'll take a look at that. Google suggests there is at least one Java-based browser sniffing project in what seems like active development, which might be useful:
>>
>> https://github.com/HaraldWalker/user-agent-utils
>>
>> Presumably you could write a more modern implementation of ERXBrowser with something like that.
>>
>>> Another problem we're encountering is the huge variety in connection speed differences between "modern" devices. Also, since people are now using USB cel sticks or their mobile devices as hotspots for laptops, the variety is unpredictable and vast. We can no longer make the assumptions about connection speed that we could have even a couple of years ago.
>>>
>>> Sorry for no solution, but maybe our experience can add fuel to the fire :)
>>
>> Definitely. I really just wanted to know what other people were doing. I fully understand the philosophical objection to browser sniffing, and the theoretical superiority of client-side capability detection and responsive design, but sometimes you have to solve actual problems in the real world on a limited budget. In this case, all I want to know is whether the user is probably running a "mobile" browser at the time of their first request.
>>
>>
>> --
>> Paul Hoadley
>> http://logicsquad.net/
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> --
> Dr. Markus Stoll (Geschäftsführer)
> email@hidden
>
> junidas GmbH, Aixheimer Str. 12, 70619 Stuttgart
> Tel. +49 (711) 4599799-11, Fax +49 (711) 4599799-10
> Geschäftsführer: Dr. Markus Stoll, Matthias Zepf
> Amtsgericht Stuttgart, HRB 21939
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden