maletor
maletor

Reputation: 7122

Rails 3 Unobtrusive Javascript Search Form Back Button

I am using unobtrusive javascript to render search results from a get request -- a search.

When a user follows a search result and doesn't like it they need to be able to hit back and get to the same results.

How do I solve this problem?

Upvotes: 1

Views: 469

Answers (1)

Michael
Michael

Reputation: 1139

You can use the HTML5 History API for modern browsers to change the URL every time you change the application state, and you call fallback on changing the URL anchor tag when you want to capture a history state. An example of the former is source code navigation in Github using PJax and Twitter is the example of the latter.

Upvotes: 1

Related Questions