Have you noticed there are some websites on your phone browser that are really slow? The browser may struggle to scroll, becoming all jerky. I’ve noticed websites on my old iPad2 causing the browser to crash. Even though that iPad is very old by todays tech standards, I used to be able to browse the web ok on very old PC hardware when I first got an internet connection over dial up, though now everything is very slow.
The other day my partner was browsing the web on her two year old Chromebook, it struggled to run a number of sites as they loaded ads, gifs, videos and tons of JavaScript to do absolutely nothing of value.
Every day I am frustrated at my phone as it chugs along trying to display a blog post. The post is there behind a sea of JavaScript and auto-playing videos.
This all sounds a bit first world problems, but it’s far, far worse for those in developing nations. Do you know how bad satellite Internet is compared to what most of us have here in the west? It is awful.
The Web I Want by Chris James.
It’s not a new phenomenon, as the amount of extra assets that are being added to webpages. I once read that most web pages now are larger in file size than the original Doom game. Its not just larger images (almost every article has a large photograph in its header, the hero image). There are web fonts to download, which cause the page text to flicker or be blank until the font can render the text.
The biggest culprit however is the additional Javascript, particular javascript trackers. This has become a big issue, not just with GDPR which is technically what a fair few of the cookies that you as a site visitor are asked to consent to (for the record, I’m, currently only using the WordPress.com stats tracker here as of the post date). It’s also used to push a lot of ad blocking and tracking blocking tools, some of which are now being baked into the latest browsers.
For me, this is something I’m thinking about a lot more, as a new project I will be starting is for web users based in low bandwidth countries, and the requirement is that it needs to work without costing site visitors huge data usage bills.
Its not just saving bandwidth though, having a fast website will also improve search ranking in Google and other search engines, and web developers are encouraged to test their sites with Google Pagespeed. That said, some of the techniques (adding styles inline for critical content) do go against web development best practices from talking to other web developer friends.
One way is to completely strip back on everything. This is the approach used by USA Today for it’s EU edition, to be complaint with GDPR. This certainly makes the site very fast, and is what I currently use to read up on news when needing a US based viewpoint. It does mean though on missing out on certain site features, such as currently the live stream feature does not work.
For the less extreme, there are some standard techniques, minimising CSS and Javascript resources, optimising images and making the website utilise browser caching. All good web content management systems will either have these features built in or available as a plugin. Theres also a case of asking if an extra asset is needed. I’ve seen a lot of web sites now move away from web fonts, and using the system font as a default. Eliminating tracking if its not really needed can also go a long way. It may also save you some GDPR headaches later on.
I’m currently researching different techniques and best practices in this space, which I will add as more resources in a future post.