Stay in the loop.
I'm trialing a newsletter. Join for monthly insights into web dev, Chrome, and the open web.
5 min read
Using the Github API to optimise your workflow
We've done a lot of work using Github in the recent past and here is some of the work that we have optimised.
2 min read
Auto-deploying Jekyll via Github
This post announces the implementation of automatic deployment for this blog, powered by Jekyll (Octopress) and GitHub WebHooks. The previous workflow involved local editing, committing to GitHub, and deploying via SSH using
rake deploy. The new process leverages GitHub WebHooks and a modified version of Github-Auto-Deploy to automatically pull, build, and deploy changes upon pushing to the GitHub repository, simplifying the deployment process and eliminating the need for terminal access and SSH keys.
3 min read
Detecting critical above-the-fold CSS
I recently used Page Speed Insights for Mobile to improve my blog's page load time and one of the key recommendations was to reduce render-blocking CSS above the fold. This led me to explore the concept of critical CSS, which is the minimum CSS required to render the initial view of a page. I developed a proof-of-concept tool (bookmarklet and devtools snippet) that analyzes the DOM and extracts the critical CSS by iterating through visible elements and using
window.getMatchedCSS(). This tool helps identify unnecessary CSS, integrate into build processes for optimization, and potentially generate page-specific CSS files for improved performance. It currently has limitations, working only in WebKit/Blink, ignoring media queries, and not handling pseudo-elements.
2 min read
Hackathons don't win you customers
I've run hackathons and learned they're not for winning customers. They're not about startups or brand awareness. They're about learning and improving your product. Treat them like beta tests where developers help find bugs and make your platform better. Focus on making your platform valuable and easy to integrate with. Reward developers for providing feedback, not just cool demos.
4 min read
Another experiment in creating a mobile friendly table of contents
I've been working on making html5rocks.com more mobile-friendly, focusing on reducing "Time to first read". The main culprit was the Table of Contents (ToC). My initial experiment with an offscreen ToC using CSS had cross-browser inconsistencies. Now, using existing JS, the ToC is fixed to the footer and toggled into view. I'm still exploring pure CSS solutions. Initially, I favored a small scrollable ToC at the bottom, but Paul Lewis suggested a full-screen ToC, which proved better. It minimizes distractions and clutter, provides more screen space for a readable, easily navigable ToC with larger touch targets and subtle hierarchy, even for long lists. The before/after screenshots demonstrate the improvement.
4 min read
Experiments in buildinig a mobile friendly table of contents
I'm experimenting with mobile-friendly table of contents designs for HTML5Rocks. The current ToC takes up too much screen space, hindering access to content. My goal is to improve user experience by getting readers to the content faster. My "Bottom ToC" experiment anchors the ToC to the bottom, expanding on tap and collapsing when the main content is tapped. It uses
position: fixed and the :active pseudo-class, requiring no JavaScript and keeping the rendered HTML consistent between desktop and mobile. Though it has minor scrolling issues, it effectively minimizes initial ToC screen coverage while remaining accessible.
2 min read
Installing Chrome for Android on an emulator
Installing Chrome for Android directly onto an emulator isn't possible, as it's only available via the Play Store. However, you can install the Chromium Test Shell, an open-source, functional version of Chromium without Chrome's usual interface. Although it lacks features like bookmarking and sync, it supports remote debugging. Find recent builds online and install them via adb. I've even created a script to automate downloading, extracting, and installing the latest Chromium Test Shell build, available on GitHub.