Chapter 5. The History API: changing the game for MVC sites
This chapter covers
- Understanding the basic operation of the History API
- Integrating MVC with the HTML5 History API
- Controlling history in a web application
Suppose you’re building a newsreader application for the web and want to incorporate a search feature for things like images, people, and places. You build a responsive HTML5 interface with a popup <div> that allows a user to cycle through multiple tabs refining the search. In the background you’re using Ajax and jQuery to ping the server for hit counts based on each updated criteria. What do you think will happen when the user cycles through three tabs adding criteria and then, out of force of habit, hits the Back button? Unless ...