mal200
mal200

Reputation: 389

Detect Android Smartphone or Android Tablet with JS

How i can detect with JS if the user is accessing my website from a smartphone or from a tablet ?

Upvotes: 0

Views: 597

Answers (1)

Femaref
Femaref

Reputation: 61477

No, there isn't. You might go by browser or user agent, but that's not really reliable.

If you want to present your website depending on the screen size, you can work with css media types and queries. This article is a good introduction.

Upvotes: 2

Related Questions