Please consider donating: a local project in memory of my daughter

Archive for the 'Code' Category

A Public MIT License Resource

Pretty much every personal project I work on I try to make it publicly available - usually under an MIT license - but I pretty much always forget to include an MIT license file. There's an Open Source Initiative with the license, but it doesn't have the date, nor the license holder. So I've released [...]

Rich text input on iOS

Rich text input is difficult on any platform, but I discovered a rather cheeky, but simple trick to give you rich text inputs on iOS.

input range polyfill

During The Highland Fling (an excellent conference by the way - highly recommend), James Edwards aka Brothercake was talking about the graceful degradation of HTML5 Web Form elements, in particular the input range type. He points out that degrading to text isn't graceful at all, because with a range, you have predefined options. Much like a [...]

link elements block DOM parsing too

Today we're pretty well versed with how JavaScript works. We know that script elements block rendering (well, actually blocks the parsing, which thus delays the rendering), and we know why8. Sure, so we put the script elements at the end of the document. But did you know that link elements block too? * document.write can affect [...]

Getting CORS Working

Recently I ran a workshop where I ran a small section of the workshop on CORS and how to enable it. In the past, I've found it to be very easy but this time around everything backfired and it didn't work. So after the workshop I went about understanding why the CORS demo it didn't [...]

Broken Offline Support

The state of offline detection in desktop browsers is broken and it needs to fixed or at least get better, but I can't see this happening unless we push against the browser vendors to fix this. Currently, as of April 2011, offline and online events are broken, as is the navigator.onLine property. The only exception appears [...]

Simple Offline Application

I've written my fair share of single file applications. All the JavaScript and CSS are inline, and if I'm feeling particularly ninja, I'll base64 encode the images, and make them inline too. To make the whole thing completely available offline is insanely easy, and reusable to boot.