I am developing a website which is a Single Page Application (built on AngularJS).
However, my client complains that using the website is causing user devices to heat up and drains the battery faster.
Technologies used for the development.
For back-end - PHP / Codeigniter
For front-end - Angular JS
I have a lot of codes written in native Javascript too.
Is it possible for a website to cause these issues? If yes, how can I solve this?
Use less power: Typically, the reason why your phone is hot and losing battery is because you've been using it for a while. Take regular breaks to preserve your phone's temperature and battery life. Install junk-cleaning software: Junk files add extra work for your phone's processor and battery.
Don't have your apps set to update automatically? A rouge app is a common cause for sudden and unexpected battery drain. Head over to the Google Play Store, update any apps that need updating (updates come around fast), and see if that helps.
Settings > Battery > Usage details Open Settings and tap on the Battery option. Next select Battery Usage and you'll be given a breakdown of all the apps that are draining your power, with the most-hungry ones at the top. Some phones will tell you how long each app has been actively used – others won't.
The methodology involved looking at which functions the apps used (such as location or camera), how much battery power those require, and whether the apps in question have a dark-mode setting. By those standards, the top five biggest drains are Facebook, Fitbit, Skype, Uber, and Verizon.
Poorly coded JavaScript can cause the browser to use more resources and hence device heats up or the battery drains faster.
Things to look for: Network calls , Unnecessary event listeners (touch , scroll), Expensive animations etc.
How to solve: Try to remove some animations and event listeners which cause lag to the web-app , those might be the ones using the most of the resources. This way you need to filter our the culprit code and optimise it.
You can refer to this BBC article for a detailed report on this : http://www.bbc.com/news/technology-17811557
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With