lowtechmag / solar

Pelican theme for solar powered version of lowtechmagazine.com
https://solar.lowtechmagazine.com
465 stars 25 forks source link

FE Performance Audit #12

Open Leland opened 2 years ago

Leland commented 2 years ago

Hey gang! Love the website and the idea behind it.

I wanted to do a dive into your site's frontend performance. Whereas I normally would call attention to things that would improve experience for the users, here I'll instead focus on things that reduce energy consumption.

A lot of this won't be possible easily, I'm sure, because of Solar essentially being a themed version of the main lowtechmagazine.com site. Hopefully, these findings apply to both sites, then :) Some of this will require a build process that you may not have setup. Feel free to email me at firstname.lastname @ gmail

image

rscmbbng commented 2 years ago

Hey, thank you very much for these in depth suggestions.

While lowtechmagazine and solar.lowtechmagazine have identical content, they are actually two completely different sites.

I actually think we don't even have native lazy everywhere because of how pelican is structured. So that would be a first step. While we don't use service workers, we do extensive caching on the web server side. To me it is not immediately clear what additional benefits service workers bring?

The CSS ordering tips are very useful, will look in to those!

Leland commented 2 years ago

Hello! Apologies for the delayed response :) The ServiceWorker – insofar as my proposal is concerned – would function just as an advanced sort of cache.

The biggest benefit is it would enable repeat visitors to use the site despite even intense network instability (or even while completely offline!).

The server's benefit is that the Service Worker replaces the browser cache's need to revalidate when assets are stale. You can grant extremely long cache times and only check in when you want.

https://web.dev/service-worker-caching-and-http-caching/