4 ms·
> Web designers are supposed to figure out an entirely new design mode for the whole site to cater to visitors with low batteries? You're constructing an obvio
by andybak 10y ago
> Web designers are supposed to figure out an entirely new design mode for the whole site to cater to visitors with low batteries?
You're constructing an obvious straw-man here. It's easy to imagine scenarios where a 'low power mode' would be in the interest of the site and it's visitors. Especially when we're talking 'apps' rather than 'content sites' - there's plenty of desirable but non-essential functionality that could be disabled and for web apps intended for mobile use this could potentially be a great differentiator.
- majewsky 10y agoThe most obvious thing is animations. Android has a powersave mode where all animations are disabled. (It's a bit unsettling, actually, but really helps with conserving the few remaining electrons.)
- m_eiman 10y agoSounds like something for the browser to handle automatically, without the site's javascript ever knowing about it.
- andybak 10y agoHow does a browser distinguish between essential and non-essential animations? (If your answer is 'there are no non-essential animations' then you haven't thought about it for long enough)
- nommm-nommm 10y agoWhat's an example of an essential animation?
- zaroth 10y agoI think it's way past the point of diminishing returns, but the answer to your question is: with more markup.
- zaroth 10y agoI think you're fighting straw with straw. Think about the development and testing costs of trying to add the functionality and have it work across a host of devices. Again, there's a litany of things a device can do to reduce power usage itself. Native apps and websites alike should absolutely consider their power profile and reduce it if possible. The idea which I think is terrible is making this part of unrestricted Web API as 14m possible states. But even as a binary state I think very few apps have the resources to design, develop, and test across multiple devices for dynamically adjusting power consumption.
- andybak 10y ago> Think about the development and testing costs of trying to add the functionality and have it work across a host of devices. 1. Simple example - any app that does polling for any reason can reduce the polling interval. 2. Interactive WebGL charts could be replaced with static bitmaps 3. Background spell or syntax checking could be disabled and made 'on demand' 4. Chatty network features could be disabled or cut back. None of the above need to significantly increase development or testing costs. They are quick examples I pulled out of thin air. If we discussed specific applications I'm sure I could suggest more. Non-browser apps already can do all this and often do. (and I wish they would do it more often)
- zaroth 10y agoI guess the way I think of it... if I am visiting a site or web app, I am actively opting to expend the energy required to render the page. Obviously if the page is not visible, and not doing a background task like playing audio, then I expect its CPU consumption to be negligible. So, first and foremost, use the page visibility API. If I'm low on battery and choose to open that webpage, and now the WebGL charts are static bitmaps, my first reaction is going to be WTF. Now I want a button synonymous with 'Show Desktop Site' -- I guess we could label it the 'Stop Fucking With Me' button. All code should be aware of the CPU that it is consuming. More efficient code is not just better for battery, but also likely more responsive and better for multitasking. So the question becomes, not how do we reduce CPU and possibly even improve UX, but in what cases would we make the CPU requirement dynamic, and when/where might the trade-offs be made to ultimately improve the user experience. So first is Page Visibility, as discussed. The very next area where I would consider making CPU usage dynamic is not a battery state, but rather it's an overall device performance adjustment. If someone visits with an iPhone 4 versus a 6s, they have dramatically different amounts of compute available. I would consider investing in dynamic CPU consumption based on a device performance flag a lot sooner than I would do it based on remaining charge, because I think it would improve the UX for a large percentage of users every time they used the site. It's also a static setting from the perspective of the device owner, so they are not seeing changing UX on their device potentially from one moment to the next. > None of the above need to significantly increase development or testing costs. I can only offer my opinion based on my experience, but trying to alter functionality to reduce CPU load based on dynamically changing battery metrics across a pool of devices which may behave inconsistently... this is really not simple to code and test and maintain over time. We have a hard enough time just trying to efficiently serve device-specific assets (like lower res images to mobile) and that's based on a static/fixed user-agent string, not a dynamic header, and sites get it wrong so often that user-agents added a special button to try to turn it off!
- nommm-nommm 10y agoThen you confuse the users by displaying some of the content only some of the time. Mobile sites are already crippled in functionality so I can't imagine them being crippled more being a good thing.