TL;DR: Prepend "about:reader?url=" to any website URL to force reader view in Firefox I'm in love with Firefox' reader view. It not only removes ads, nag-screens, subscription prompts and other clutter from articles but it's typographical choices often are better than the (well-intended) choices of the author. I also value the consistent look and feel … Continue reading Force-enabling Firefox’ reader view
Tag: web
AWS diaries: serving HTML from lambda
AWS lambda is a neat feature that runs code in response to requests and transforms the code's output into some response. Requests can be an event occurring in the AWS platform such as an S3 modification or an HTTP request. The response is an MVC-style model which needs to pass through some network component, like … Continue reading AWS diaries: serving HTML from lambda
Error handling for failed network requests with service workers
Most service worker code samples show only the happy path where the fetched resource will eventually be available, eg: self.addEventListener('fetch', event => { // Skip cross-origin requests, like those for Google Analytics. if (event.request.url.startsWith(self.location.origin)) { event.respondWith( caches.match(event.request).then(cachedResponse => { if (cachedResponse) { return cachedResponse; } return caches.open(RUNTIME).then(cache => { return fetch(event.request).then(response => { // Put … Continue reading Error handling for failed network requests with service workers
The Model-View-Presenter-Controller pattern
In this post I'll talk about the MVPC (Model-View-Presenter-Controller) design pattern I use in client applications such as progressive web apps and mobile clients. It can be best understood as an evolution of the MVC (model-view-controller) pattern past the MVP (model-view-presenter) pattern. The basics: MVC and MVP You might want to skip this section if … Continue reading The Model-View-Presenter-Controller pattern
Book of dark arts: selective disclosure with CSS
Show and hide pages and page elements with declarative CSS instead of imperative code