4 ms·
If you want to just change the styling and layout of the page depending on the user's device, then you can use css's media queries[0]. But if you want to serve
by niea_11 7y ago
If you want to just change the styling and layout of the page depending on the user's device, then you can use css's media queries[0]. But if you want to serve two totally different pages (one for mobile and another for desktop), then I don't see how it can be done without JS or reading the user agent.
[0] : https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queri...
- logfromblammo 7y agoIf you want to serve two totally different pages, you use two totally different URLs, and don't try to second-guess what the user asked for.