Easily optimize your blog performance

Following Sylvain K.'s post on making your website lean, I went down the rabbit hole. Believe it or not, the size (like a regular file on your computer) of a web page has an impact. For this business, a 0.3 seconds difference in loading costs 8 million euro for customers in data usage (see presentation). Out of curiosity, I ran PageSpeed Insights from Google to find out my web page score for this blog. I scored a somewhat disappointing 71 on mobile and 83 on desktop (out of 100)... :

img
Mobile, before optimization

img
Desktop, before optimization

Most of the potential savings were in the form of optimizing the size and format of my posts pictures. Google recommends their own format called webp for images. As the extension of the file-type not so subtly suggest, it is optimized for the web. Thankfully, the superb scoop has Google command line application to convert images to webp:

    scoop install libwebp

Following the installation, I just converted my original images to webp using the standard ouput presets of cwebp:

    cwebp.exe input-image.png -o output-image.webp

And voilà! A beautiful reduction of 97% in size: img

Unfortunately, when uploading to snap.as, the service included with write.as, the picture is converted to /png/ and the size balloons back to 1 800 KB...

img

So, while not entirely defeating the purpose, I would expect an image hosting service to support one of the main file type for the web. For now, I will resort to using my own CDN until I find a host or kindly ask snap.as to support this format. At least, the result speaks for itself:

img
Mobile, after optimization

img
Desktop, after optimization

Most of the savings left for mobile are out of my hands so to speak. I have limited control over the JavaScript used by write.as. And that's exactly how I want it. After all, the purpose of using a platform like write.as is to concentrate on the words rather than the delivery... Except when it's relatively easy to facilitate the delivery. ;)

Notice

This post is not in any way an endorsement for Google and the way they determine if your web page is fast enough.