4 ms·
So you'd have to refresh the page when you change phone orientation from portrait to landscape?
by orph 13y ago
So you'd have to refresh the page when you change phone orientation from portrait to landscape?
- webdevsometimes 13y agoThe server could just give the requesting device what it needs to display the content in both orientations. That doesn't necessitate also giving it the layout for 10 other possible screen sizes.
- Tobani 13y agoWhile most mobile devices have exactly 2 size, that may not be a good assumption. There are some devices that support split-screen and you would end up with more that just 2 sizes. You could send a list of all possible sizes, but If the split-screen is customizable it maybe not be feasible to enumerate all of them.
- jmhnilbog 13y agoYou user can define the 'measurer' function, and what triggers a measure. I think the defaults check for the onorientationchange event, with a polling fallback.
- joshribakoff 13y agoUnintentional straw-man argument. If the device adapts from 400px width to 300px, then there's no need to send me the markup that's applicable to 600px. Github for example serves different markup to mobile, while simultaneously implementing responsive design on client side. Responsive design is great until you force my phone to download 0.25mb of HTML it will never render. So what I'm suggesting is two layouts, both responsive.. one for desktops, other layout (also responsive) is for mobile devices.
- jmhnilbog 13y agoWhile the demo site doesn't go this far, it would be possible to send minimal code to the client with basic client-sniffing 'intentions', then use that information to trigger some wacky ajax or redirect with more targeted markup. Many 'intentions' respond to live events, so sometimes it makes sense to give all the markup up front. Take a look at some of the goofier examples, like animation (http://intentionjs.com/2013/03/12/walking-man.html http://intentionjs.com/2013/03/12/walking-man.html).
- dubcanada 13y agoServer side device stuff is annoyingly hard to get 100% correct though, you need to get a giant library that needs to be updated every week and requires a massive amount of resources to scan over the list of devices to find the one that is currently browsing. But I kinda of agree, if you are browsing at 400px's you shouldn't be getting stuff for 1024px's. And vice versa.