IOS device detection #78201
Unanswered
cryptoHersh
asked this question in
App Router
Replies: 1 comment 2 replies
-
What do you want to do with this info? Just for completeness sake, it is possible to do stuff with CSS client sdie. The go-to library, faisalman/ua-parser-js#671, seems to have given up? If the User Agent is not enough, then we are kind of short of options in a server side environment. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Modern iPad Ios safari has by default desktop set up, hence it is impossible to detect iPad device type in server components using UserAgent. Has any one found any solution to this?
At present you can detect device on client component using window object however in case if you need this info on layout.tsx or any parent SSR it is almost impossible to detect iPad as a mobile or tablet device. Below is sample user agent from iPad.
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.4 Safari/605.1.15
Beta Was this translation helpful? Give feedback.
All reactions