O'Reilly logo

Sams Teach Yourself HTML5 in 10 Minutes by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 6. Working with Browser History

HTML5 gives you control over the browser’s history—where it’s been and where it is now. The History object lets you move forward and backward, from page to page in the browser, which means you can use the history object, for example, to go back three pages.

You can also store data in a browser’s history state object. That is, you can add data to the state object and then push that state object to store it with the current page. You can also pop the state object, recovering the data you stored, which allows you to pass data from page to page.

We’ll see how all this works in the current lesson. Let’s jump into browser history now.

Welcome to Browser History

In this lesson, we’ll develop an example named ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required