David Walsh Tutorials

  • By
    Basic AJAX Request: XMLHttpRequest

    There are a number of common front-end tasks that many of us never touched the deep, dirty APIs for because our beloved JavaScript frameworks have provided easier ways to work with them.  That's why I wrote How JavaScript Event Delegation WorksDo a Basic HTTP Request with...

  • By
    Convert Video to GIF or GIF to Video

    I feel like GIFs are more popular now than back in the day when they were just about the only way to have moving imagery on the web.  They were so useful because crap like Real Video Player, Windows Media, and other crap formats all required a...

  • By
    Element matches / matchesSelector

    I was thinking about HTML elements and selectors recently.  We usually start by searching for an element(s) via querySelector/querySelectorAll, which makes sense, but what if you want to validate that an element that wasn't specifically selected matches a given selector?  For example, say you have a...

  • By
    MutationObserver API

    One of my favorite web tricks was using CSS and JavaScript to detect insertion and removal of a DOM node, detailed in Detect DOM Node Insertions with JavaScript and CSS Animations.  The technique and blog post were published during a time when we didn't have a reasonable...

  • By
    File API

    Working with file uploads, especially on the front end, was always a hassle.  We didn't use to be able to drag and drop files, complete AJAX uploads, provide multiple files, and hell, we couldn't get any information about the file until it hit the server; you'd...

  • By
    Qards: How to Create an Awesome Website with Video Backgrounds

    A video is nothing else then "image in motion".  For someone, a video might represent the essence of enriching memories from childhood; for another one it might be a PR and sales instrument to showcase the latest smart device on market. No matter what's the story...

  • By
    Google Art Project – Chrome Extension

    As my career progresses, I see more apps and services which try to invade my space.  Notifications, emails, alerts...everyone wants a piece of me.  And I'll level with you:  they drive me mad.  I want the least amount of interruptions as possible and I want the...

  • By
    Convert an Image to Grayscale with ImageMagick

    A few years ago I bought a DSLR camera with a bunch of filter effects built in and it's been worth every penny.  I took some incredible photos in London, Paris, and Jamaica, and tooks some really special photos of my son during his first few years.  And...

  • By
    Get Bitcoin Value with curl or Node.js

    Last year I started dabbling in bitcoin.  Of course I was immediately cocky as bitcoin value went up 20% as soon as I bought it, then was humbled as bitcoin's value tumbled down 50%.  From boathouse to outhouse.  From caviar to ramen noodles.  It was brutal. Anyways, I was...

  • By
    Get Open Graph Data with Node.js

    Two of this blog's most popular posts are Facebook Open Graph META Tags and How to Create a Twitter Card.  I'm not at all surprised because we as content creators want some visual control over how our site is represented and shared on third party sites, especially social media...