Detect Mobile User Agent in Nginx

Hafiq Iqmal
Geek Culture
Published in
3 min readApr 19, 2022

--

You might notice that some website have 2 different URL for mobile view and desktop view like Facebook. Facebook has m.facebook.com for mobile view and facebook.com for desktop view. Usually, the main website, they don’t care about responsive design. If customer want to well fit the in mobile view, just use the another website which only for mobile view like m.facebook.com (with subdomain of m indicate mobile).

In my opinion, for some reason why developers or companies separate their website responsiveness because building a responsive website is quite painful where need…

--

--

Hafiq Iqmal
Geek Culture

Tech Lead Developer | Software Engineer | Laravel Enthusiasts | CTF Newbie | Medium writer | UiTM Alumni | Husband | Proud father of a beautiful daughter