Saving Data in the Browser Welcome to Building on HTML5: Saving Data in the Browser. This is Craig Shoemaker. And in this module, you're going to walk away armed with the knowledge of how browser-based persistence works, along with a good idea of when to use the different available options. So let's get started by talking about the two different types of storage covered in this module. The first type is Web Storage, the simplest of the two options presented here. Web Storage takes advantage of a simple API, which makes saving small amounts of data in the web browser a very simple process. IndexedDB is an in-browser document database capable of handling large amounts of data, complete with support for queries, indexes, and versioning. Alright, well let's get started looking at the details of Web Storage.
Creating “Multithreaded” Web Applications Welcome back to Building on HTML5. This is Craig Shoemaker, and the next technology to unlock for your applications is web workers. In this module, you'll take scripts out of the page and move them into their own context, essentially allowing them to process in their own thread. So to define a web worker, you simply have browser-based background threads. These threads can either be a dedicated worker or a shared worker. A dedicated worker is only accessible through the script that spawns the worker, while a shared worker is available to any page in the domain. This module deals exclusively with dedicated workers, and the next module, which highlights service workers, lets you work hands-on with a shared web worker. Now we're going to jump into the code quickly here, but there are a few things that I want you to be aware of before we do.
Taking Your Application Offline Welcome back to building on HTML5. This is Craig Shoemaker. And in this module, you'll learn about the APIs available to allow your web applications to go offline. Service workers are a shared scope web worker that allows your apps to intercept requests for pages, styles, scripts, and images and decide if you want to retrieve them from the network, out of the cache, or perhaps from somewhere else. This fine-grained control allows you to very easily create an application that works offline while giving you liberal amounts of flexibility on how you might fulfill those requests. Now this control really came battle earned.
Communicating in Real Time Hey there, and welcome back to Building on HTML5. This is Craig Shoemaker, and in this module, you'll learn to use the WebSocket API to allow your web applications to communicate in real time. Web sockets give you full duplex or two-way communication between the client and the server. This means that once you establish a connection to a socket server, you can send messages to and from the server with a very small network payload. And being able to make this communication with such small amounts of associated data makes real-time communication possible using WebSockets. Alright. Well, let's back up just a moment so you can better appreciate the advantages of using WebSockets.
Making Your Application Geographically Aware Hello, and welcome back to Building on HTML5, the last module in the course. This is Craig Shoemaker, and thanks for joining me at this module where you get to learn how to make your apps geographically aware. Now the geolocation API allows you to make requests to attempt to determine the geographical location of the browser, and you have a couple of different options available to you. You can request the location information once or on a continual basis, and the demos included in this module show both approaches. Now before looking at the code, it's important to have an idea of how the location is determined.