A
A
AstonMartin2015-10-03 09:28:13
PHP
AstonMartin, 2015-10-03 09:28:13

How to determine the phone model of a site visitor?

Hello!
A library is needed (better for local use, without external requests) to determine the visitor's phone version (not OS, browser, etc.).
Preferably without external requests.
Yandex.Locator closed like.
WURFL is some kind of monstrous ...
In fact, you just need to parse the User Agent. It turned out to recognize the model - well, if it didn’t work out, then it’s also not critical.
I must say right away that it is not necessary for layout and so on.
Maybe some easy script?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Алекс К, 2015-10-03
@alexk111

Попробуйте https://github.com/bestiejs/platform.js
Среди прочего парсит и ту информацию, что Вам нужна:

platform.product; // 'iPad'
platform.manufacturer; // 'Apple'
platform.os; // 'iOS 5.0'

O
odd-look, 2015-10-03
@odd-look

Нативно - window.navigator.
https://developer.mozilla.org/en-US/docs/Web/API/W...

A
AstonMartin, 2015-10-03
@AstonMartin Автор вопроса

Наверное все-таки остановлюсь на WURFL.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question