javascriptphpmobile-deviceswurfl

How to check if javascript is enabled or not using wurfl?


Question says it all. I can get the mobile name using mobile_name I can get brand name using brand_name etc.

But how to check whether javascript enabled or not?


Solution

  • From the WURFL website:

    WURFL, the Wireless Universal Resource FiLe, is a Device Description Repository (DDR), i.e. a software component that maps HTTP Request headers to the profile of the HTTP client (Desktop, Mobile Device, Tablet, etc.) that issued the request.

    No browser sends information about JavaScript being enabled or not in the HTTP Request headers, so you cannot use WURFL for this purpose.

    Even if the browser had JS enabled, the JS might be blocked (e.g. by NoScript or AdBlock) or fail to download (because the user is on a train and went through a tunnel at the wrong moment) or throws an error (because you didn't test on the slightly obscure browser the user is using).

    Follow the principles of Progressive Enhancement and Unobtrusive JavaScript instead.