iPad device detection is impossible in Server component using Useragent
Unanswered
Northeast Congo Lion posted this in #help-forum
Northeast Congo LionOP
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
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