Recently, technology reporter Jacob Aron wrote a blog post on newscientist.com
that talks about how bloated website code drains your smartphone’s battery.
One example that is cited is that simply loading the mobile version of Wikipedia
connection consumed just over 1 per cent of the phone’s battery, while browsing apple.com, which does not have a mobile version, used 1.4 per cent.
On Wikimedia wikis
ResourceLoader solves this problem by loading resources on demand and only for browsers that can run them. Although there is too much to summarize in a simple list, the major improvements for client-side performance are gained by:
- Minifying and concatenating
- → which reduces the code’s size and parsing/download time
- → which reduces the number of requests made
- → which further reduces the number of requests, response time and bandwidth
- Optionally images referenced in stylesheets can be embedded as data URIs. Together with the gzippping of the server response, those embedded images, together, function as a “super sprite”.
Patrick Reilly, Senior Software Developer, Mobile