Skip to content Skip to sidebar Skip to footer

How To Check If Device Is Windows Surface Tablet And Browser Is Chrome Or Ie

How to check if device is Windows Surface Tablet and browser is chrome or IE using Javascript. i have tried following code function is_touch_device() { try { document.cr

Solution 1:

Using the navigator object you can access these data fields

navigator.appName  <- gets app name may be misleading so also get the appCodeName
navigator.appCodeName; <-- alternate name
navigator.platform; <-- platform the user is on

http://www.w3schools.com/js/js_window_navigator.asp

Solution 2:

window.navigator.pointerEnabled

This method returned true Surface devices.....

Solution 3:

Though you can use navigator object to serve your purpose, I would suggest you to use modernizer for the same.

Post a Comment for "How To Check If Device Is Windows Surface Tablet And Browser Is Chrome Or Ie"