4 ms·
does this mean there will no longer be a way of determining if the device is primarily touch (basically all of "android", "iphone" and "ipad") or guesstimating
by leeoniya 7y ago
does this mean there will no longer be a way of determining if the device is primarily touch (basically all of "android", "iphone" and "ipad") or guesstimating screen size ("mobile" is typical for phones in the UA) on the server?
https://developer.chrome.com/multidevice/user-agent https://developer.chrome.com/multidevice/user-agent
i wonder what Amazon will do. they serve completely different sites from the same domain after UA-sniffing for mobile.
is the web just going to turn into blank landing pages that require JS to detect the screen size and/or touch support and then redirect accordingly?
or is every initial/landing page going to be bloated with both the mobile and desktop variants?
that sounds god-awful.
- bdcravens 7y agoPresumably you'll grab the dimensions (could cache after first load) and then render dynamically based on that. If you're doing some sort of if statement on the server to deliver content based on screen size you're probably doing it wrong. Obviously I can't speak for every mobile user, but for myself, it's infuriating to have a completely different set of functionality on mobile.
- leeoniya 7y ago> If you're doing some sort of if statement on the server to deliver content based on screen size you're probably doing it wrong. Obviously I can't speak for every mobile user, but for myself, it's infuriating to have a completely different set of functionality on mobile. there's not a "right" and a "wrong" here; it's about trade-offs. you're either stripping things down to the lowest common denominator (and leaving nothing but empty space on desktop) or you're wasting a ton of mobile bandwidth by serving both versions on initial load (the most critical first impression). you frequently cannot simply squeeze all desktop functionality from a 1920px+ screen onto a 320px screen - unless you have very little functionality to begin with. Amazon (or any e-commerce/marketplace site) is a great example where client-side responsiveness alone is far from sufficient. https://www.walmart.com/ https://www.walmart.com/ does it okay, but you can see how much their desktop site strips down to use the same codebase for desktop and mobile.
- ohthehugemanate 7y agobrowser feature detection is the way grown up developers have been doing this for several years now. user agent sniffing is dumb because it bundles a ton of assumptions with a high upkeep requirement, all wrapped up in an unreadable regex. It's been bad practice for ages; I'd be surprised if that's how Amazon is doing it still.
- leeoniya 7y ago> browser feature detection is the way grown up developers have been doing this for several years now. and how do these grown up developers feature-detect when js is disabled? or are they too "grown up" to deal with anything but the ideal scenario? > I'd be surprised if that's how Amazon is doing it still. why don't you go there and open up your "grown up developer" devtools.
- gowld 7y agoIf your site doesn't use JS, you don't need features. Just use responsive HTML.
- Rebelgecko 7y agoHow do you handle browsers that render HTML differently?