Javascript and Mobile
Periodically my phone gets *really* hot and my battery drains quickly.
I have wasted a tremendous amount of time troubleshooting. I’ve cleared RAM, killed background tasks and uninstalled lots of apps.
It seems that the problem is Javascript. The browser appears so closely integrated into the OS that it cannot be closed (it simply pushes into the background) and any looping Javascript on a webpage continues running which drains my battery and creates heat. Not all sites using Javascript cause this problem.
Web designers put a great deal of effort building sites that respond to the size and resolution of device screens. Javascript is one of the tools used to achieve this objective. Since this means flattening my battery I am considering turning off Javascript altogether.
Optimising a site for mobile should include design decisions other than simple display and usability considerations, such as methods that preserve the battery of the device…
If anyone has any good ideas or examples of best practice they would like to share, please leave a comment.
No comments yet.