BROWSER HISTORY FOR AJAX APPLICATIONS

Ajax requests can't be cached in browser history. So, ajax based contents cannot be taken back or forward. Ajax History beta plugin, provides this functionality for ajax applications. Usage is very simple. After including the plugin, the only thing to do is, defining an html dom element which includes the ajax based content and set history parameter true.

NOT: Because of an iframe bug in Internet Explorer, another html page is needed to work in IE. Copy the "blank.html" in the downloaded archive, to the same directory where you work with history plugin.

You can see how it works in the example below. Change the pages and click browser history buttons.

Example #1:
Loading...
Page #1 Lorem ipsum dolor sit amet, etiam nunc lorem pretium velit, netus interdum pharetra ad quisque nibh lobortis, a libero purus, etiam a scelerisque. Id erat elit ante, ac auctor curae sit urna donec, sapien augue. Est vitae, nec fermentum non dolor non magna, vestibulum ultricies. At rutrum ut vitae purus. Tempor sit id. Pharetra mus, tincidunt eleifend non fringilla, mattis proin lectus, molestie mauris ut. Amet adipiscing pharetra vestibulum amet vitae platea, in parturient turpis ut, nullam in lacus lobortis quis netus, suscipit dolor nam nulla, scelerisque inceptos eu. Amet non pharetra ac, morbi odio quam facilisis amet, dictum integer turpis, deserunt id hymenaeos urna purus laoreet, volutpat tempus neque. Leo reprehenderit rhoncus massa vitae sit, quo rutrum nec aenean mi nulla. Maecenas venenatis mattis sapien, mauris vivamus, condimentum felis placerat. Sodales vehicula elit proin eu quis, mattis suspendisse, in et quam vitae quisque et mattis, vulputate vel et ornare nulla netus ultrices, purus nihil pellentesque sit dictumst mauris. Ultrices fringilla donec porttitor, vel consectetuer pellentesque, adipiscing lectus amet non.
Page #2
Page #3
Page #4
Page #5
Page #6
Page #7

Click to see the html and css codes of the table below.

You may include the plugin file after Run method, or Run method can handle this with an additional argument. Below, an html dom element with the id "history-content" is passed to PLX.SetHistorySection method (one call per page). Thus, inner content of this element may be taken back or forward when it is changed by an ajax request with history:true parameter.