Getting started with the Ambient Light Sensor

The Ambient Light Sensor API provides developers with the means to determine ambient light levels as detected by the device’s main light detector. This information is available to developers in terms of lux units.…

How to display a "new version available" for a Progressive Web App

In this article, I will show you how to add a notification to your site and display it each time that there is a new version of the service worker available. You’ll also learn how to refresh the page, so that the user is up to date and has the latest version of any cached files.…

Progressive Web Apps - Book Giveaway

"Progressive Web Apps" has recently been released, and if you haven't already gotten your hands on a copy, I have 5 free copies to give away to lucky readers.…

Shape Detection API: Detecting barcodes, faces and text inside an image

Did you know that your device has the amazing ability to detect different shapes in images? Right now, whether you are on a mobile, tablet or desktop, it is capable of detecting faces, barcodes and even text in an image. Pretty amazing, huh?! According to the HTTP archive, images make…

CPU throttling using Chrome Developer Tools

I recently gave a tutorial at Velocity Conference in Santa Clara about some of the amazing features that lie within the browsers we use everyday. As web developers, we are pretty lucky to have such awesome developer tools at our disposal. After the tutorial was complete, a few people asked…

A Basic Guide to the Fetch API

As web developers, we often need the ability to retrieve data from the server in order to update our applications asynchronously. Traditionally this data is retrieved using JavaScript and the XMLHttpRequest object. A simple example of this might look something like the code below. In the code above, there are…

Rendering PDFs with pdf.js using HTML5 and JavaScript

The web is full of PDFs floating around out there. How many times have you tried to open a PDF file on a machine and not had the correct software installed? It can be very frustrating. For most users out there they already have the correct software installed to view…

jQuery Mobile - Optimizing your Website for Smartphone's and Tablets

As developers today, our websites are constantly being accessed from different forms of devices - PC's, Mac's, iPhones, Blackberry's, iPads - and the list goes on! Developing websites and content that conforms to all these standards can be a nightmare. Luckily, jQuery has just released a version of their library…

Lazy loading images with jQuery

Some of the articles written on this site are pretty image intensive and take up a lot of resources when loading up. An awesome way to improve page load times as well as providing a better user experience is to use lazy loading for your site. There is a excellent…