JavaScript: Detect Mobile Webbrowser

Veröffentlicht am Autor JonasHinterlasse einen Kommentar

There are many ways and functions to detect if a device is a mobile one.

Here is mine, having no need for a database of user agents and also not depending on page ratio (yes works also on modern tablets).

Objectives: to have something small, efficient and reliable.

 

I tested it by a hand full of devices having multiple browsers installed, also I faked some user agents with my desktop browser in order to test the function.

 

 



Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.