0

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

mal200
  • 389
  • 7
  • 19

1 Answers1

2

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.

Femaref
  • 60,705
  • 7
  • 138
  • 176