Chapter 16: Catching Interactive Data

One of the most powerful and practical aspects of working with Web programming is the ability to store and retrieve data. HTML5 has some capacity for such data storage and retrieval; however, as Chapter 15 showed, any data that is stored is going to be related to an individual’s browser. As you saw in Chapter 15, for the time-being, all the browsers aren’t exactly playing nicely together in the sandbox when it comes to data storage. Plus, the data are stored on the user’s computer, and while that’s useful for some things, such as recognizing a user’s interests when returning to a Web site, every user has some kind of local storage. How do you store data (like a blog comment) so that anyone with a browser can access it?

To give you a sense of what this chapter introduces, consider something simple you can do on the Web: maintain and comment on a blog. Suppose you have a blog that discusses HTML5. Once or twice a week, you sit down and write a blog entry about HTML5. Now suppose you attract a big audience of blog readers, and these readers comment on your entries. How do you store and retrieve your comments and those made by others? One way you could do it would be to rewrite your Web site for every entry and comment. But that would be so awkward that not much blogging would take place.

Blogs are set up using different server-side languages, like PHP. Thord Daniel Hedengren’s Smashing WordPress: Beyond the Blog (Wiley) explains how to optimize ...

Get Smashing Html5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.