Discussion

Should UA-sniffing for mobile content be standard?

Why is it that server-side user-agent sniffing for mobile content is pretty much standard now? Developing in such a way is clearly considered bad practice for desktop browsers (hence projects such as jquery and modernizr).

You could possibly justify a different sub-domain for mobile content in order to reduce bandwidth and ease development. However, you shouldn't force a redirect to one or the other any more than you would force redirection to subdomains for foreign languages. Perhaps, as with localization, use detection to suggest a subdomain and then use cookies to store a preference.

Even if the devices do have different capabilities, a good front-end engineer would be able to work around this with techniques such as feature detection, graceful degradation and responsive design. If we don't change the most-common, current method soon, then we will end up developing for far too many different types of mobile devices in the future.

Refs: http://pinchzoom.com/posts/anatomy-of-a-html5-mobile-app/ or try http://www.google.com on a mobile and then a desktop

1 points Enideo 15 years ago 0 comments

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton