Hi, I have seen the announcement of WURFL.js. Is WURFL.js a reliable way to detect wheteher a browser is running on a smartphone or a tablet?
There are several optimizations that I would like to do based on this bit of information.
Best Regards
Detect tablet and smartphone browsers with Javascript
-
- Posts: 6
- Joined: Fri Oct 19, 2012 4:22 pm
-
- Posts: 294
- Joined: Mon Jun 20, 2011 5:04 pm
Re: Detect tablet and smartphone browsers with Javascript
Hi Wurfl Lover,
In order to detect a smartphone, you can simply do:
For tablets, it's very similar:
Please let us know how it works for you. Thanks
The answer to your question is "yes. Of Course!". You just need to include the following script to the pages where you want tablets detected:Is WURFL.js a reliable way to detect wheteher a browser is running on a smartphone or a tablet?
Code: Select all
<script type='text/javascript' src="//wurfl.io/wurfl.js"></script>
Code: Select all
if (WURFL.form_factor == 'Smartphone'){
//do things that are specific to Smartphone
}
Code: Select all
if (WURFL.form_factor == 'Tablet'){
//do things that are specific to Tablet
}
Re: Detect tablet and smartphone browsers with Javascript
Hi,
We started to test wurfl.js and we are experiencing issues when detecting iphone 4/4s/5/5s device.
They all respond with:
is_mobile: default
form_factor: Robot
Any hints on how to solve this?
Thanks
Massimo
We started to test wurfl.js and we are experiencing issues when detecting iphone 4/4s/5/5s device.
They all respond with:
is_mobile: default
form_factor: Robot
Any hints on how to solve this?
Thanks
Massimo
-
- Posts: 294
- Joined: Mon Jun 20, 2011 5:04 pm
Re: Detect tablet and smartphone browsers with Javascript
Massimo, something isn't right here. Are you using the built in browser? are you going through some proxy of some kind to reach the Internet?
can you please snoop the HTTP headers at this URL: http://db.scientiamobile.com/h
Please send us a note once the headers are captured.
Thanks
can you please snoop the HTTP headers at this URL: http://db.scientiamobile.com/h
Please send us a note once the headers are captured.
Thanks
-
- Posts: 1
- Joined: Wed Jan 28, 2015 12:46 am
Re: Detect tablet and smartphone browsers with Javascript
The wording of the license is a little vague. The e-commerce site is available to the public free of charge and does not require a fee-based subscription or other fee-based restricted access, so can we use wurfl.js?
Thanks
Thanks
-
- Posts: 65
- Joined: Thu May 19, 2011 2:49 pm
Re: Detect tablet and smartphone browsers with Javascript
yes, you are welcome to use it compatibly with the rules explained in the license.so can we use wurfl.js?
If there are specific parts of the license you find too restrictive, we have a WURFL.JS Business Edition ready (not yet announced). That product is not free, but it provides extra features and removes some of the restrictions of the Community Edition License.
Thank you
Who is online
Users browsing this forum: No registered users and 6 guests