Archive for the ‘JavaScript APIs’ Category

Taking Web Audio Offline in iOS 6 Safari

Playing cached audio for offline use on iOS Safari has long been a challenge that has proved to be mission impossible. But with the advent of the WebKit-only, it is now finally achievable — although you still need to jump through a few hoops.

HTML5 Audio — The State of Play

Guest doctor Mark Boas returns with a follow up to his 2009 article Native Audio in the Browser, which covers the basics of HTML5 audio. Read the original if you want to get a feel for the <audio> element and associated API. If not, get comfortable and dive deep to learn about the current state of play for HTML5 audio.

Drag and Drop and Automatically Send to the Server

I realised (when looking myself) that there are a lot of demos and tutorials that show you how to drag-and-drop a file into the browser and then render it on the page. They're often labelled as "drag-and-drop and upload", but they actually don't upload. This tutorial will take you that final step.

Server-Sent Events

We’ve already had a glimpse at Server-Sent Events (also known as EventSource, and I’ll switch between the two to keep you on your toes) in my Methods of Communication article from last year. In this article, I want to delve in to more detail about the SSE API, demonstrate its features, and even show you how to polyfill browsers that lack EventSource support.

Pushing and Popping with the History API

Until recently, we developers couldn’t to do much with the state and history of the browser. We could check the number of items in the history and push users forwards and backwards, but this provides little benefit to the user. With the rise of more dynamic web pages, we need more control. Thankfully, HTML5 gives [...]

Finding your position with Geolocation

The Geolocation API provides a method to locate the user’s exact (more or less – see below) position. This is useful in a number of ways ranging from providing a user with location specific information to providing route navigation.

Go offline with application cache

HTML5 introduces new methods for enabling a web site or web application to function without a network connection. When you’re working on a mobile connection and your signal drops, or you just have no connection to the internet for whatever reason, having some level of access is better than nothing. In this article, we’ll look at how the application cache can store resources to be used by the browser when it’s offline, granting your users partial access to your web site or application.

Methods of communication

By now, you've surely realised that 'HTML5' is so much more than just markup. There's also an army of associated JavaScript APIs. Among the ranks are a few new technologies that open up how we communicate between client and server and across documents. Let's take a look.