how to prevent/accelerate the timeout ?

For those who like to stay on the client
Properties4Two
Posts: 2
Joined: Thu Dec 18, 2014 9:46 am

how to prevent/accelerate the timeout ?

Postby Properties4Two » Fri Jan 02, 2015 4:51 am

Hello,
First of all, Happy New Year to the whole team!

While i was doing some testing I find myself not able to call the wurlf.io website (isseu was accidentally on my side).
And of course my JS testing wasn't working (WURFL object inexistant), which lead me to testing the case of a timeout issue.

How can we avoid extreme loading time in case of unexpectly long load time of the wurfl.js ?

Elliotfehr

Re: how to prevent/accelerate the timeout ?

Postby Elliotfehr » Fri Jan 02, 2015 9:56 am

Hello,

If you would like to prevent external HTTP requests while working locally or while testing, I would recommend saving a WURFL object to file accessible by your local webserver as opposed to loading the WURFL object from wurfl.io. I have posted several examples of WURFL objects for you to get started with.

Desktop device:

Code: Select all

var WURFL = {
    "is_mobile": false,
    "complete_device_name": "generic web browser",
    "form_factor": "Desktop"
};
Tablet:

Code: Select all

var WURFL = {
    "is_mobile": true,
    "complete_device_name": "Google Nexus 7",
    "form_factor": "Tablet"
};
Smartphone:

Code: Select all

var WURFL = {
    "is_mobile": true,
    "complete_device_name": "Samsung GT-I9300 (Galaxy S III)",
    "form_factor": "Smartphone"
};
Thank you,

Elliot


Who is online

Users browsing this forum: No registered users and 1 guest