Sometime last year the CBC Prince Edward Island News website got updated, and in the process, it became effectively useless on my mobile phone.
While nominally “mobile friendly,” whatever framework the CBC decided to use for its updated website renders very slowly and confusingly (with images loading and the resizing after a delay), and responds erratically to navigation (often retrieving the wrong story because it misinterprets my taps). It’s very frustrating to use.
As the CBC is an important news source on Prince Edward Island, I set out to try to solve the issue, using Node-RED, the handy visual programming system that I’ve used before with my sensor experiments.
In a nutshell, here’s what this flow does:
- Retrieves the CBC Prince Edward Island RSS feed.
- Parses the RSS feed to extract each headline, and uses these to assemble a simple HTML page; each story is linked to the faster-loading AMP version of itself, rather than to the full-blown web version.
- Returns the HTML.
The simple page it returns looks like this on my mobile phone:
More important than the simplicity of the page, however, is how quickly the page is returned, and how easy it is to navigate. Even with all the “grab the RSS feed and parse it and return HTML” machinations–run on a pokey old Raspberry Pi, no less–this all happens quickly.
Here’s a side-by-side screen capture of my stripped-down Node-RED powered page on the left, compared to the CBC’s mobile website on the right, both sessions with a goal of loading the headlines and then navigating to the 3 arrested in Kensington while police chasing snowmobiles story that ran this morning:
It took me 7 seconds to use the Node-RED-powered version to get to the story; using the CBC website it took 30 seconds to get to the same story: not only did everything load more slowly, but I had to wait for everything to load, including the ads, before I could reliably tap on the story from the front page.
If you want to try this yourself, and are set up with Node-RED, you can download my flow and import it.