Print

Print


What method do you use to detect mobile-or-not?

On 1/2/2013 3:33 PM, Ken Irwin wrote:
> Sarah asks about how to direct users to mobile versions of databases where appropriate.
>
> The way I'm doing it is:
> 1. All database links are served up from a database table, so the link on our website is http://$OUR_LIBRARY/redirect?$db_id
> 2. The db-of-dbs knows if there is a mobile specific url (because we put it there...)
> 3. Detect mobile-or-not as a binary value
> 4. Serve up the right one as an HTTP header redirect
>
> One big exception: EBSCO (which provides a really large number of our databases) handles their mobile access by using the same URL with a different profile name in the url. The redirect script has a special case that says if ($mobile = true and $ebsco = true) { do string replace on the url to change from the desktop url to the mobile url } -- so I don't have to list both versions of the URL in the database.
>
> It seems to work out pretty well.
>
> Ken
>
> -----Original Message-----
> From: Code for Libraries [mailto:[log in to unmask]] On Behalf Of Sarah Dooley
> Sent: Wednesday, January 02, 2013 3:25 PM
> To: [log in to unmask]
> Subject: Re: [CODE4LIB] Responsive Web Site Live
>
> Very cool--congratulations!
>
> In addition to Dave's questions, I'd be curious to know (can't see it since I don't have a login) how you handled directing people to databases that have mobile versions. This is something I've been wondering about for our site down the road and library sites in general--from a responsive site, how to effectively link people out to vendor-provided resources that are either mobile or non-mobile.
>
> -Sarah Dooley
>
>