change path of state saving cookie

change path of state saving cookie

beginner_beginner_ Posts: 55Questions: 2Answers: 0
edited February 2012 in General
I use server-side processing (php) and each row contains a link to a detail view of that record on a different page. When clicking the back button on the detailed page the pagination state should be saved, that is why i want to save state and it works.

However there is also a search page and the result of said search is displayed in datatables. The issue is that the state is also saved for a new search instead of starting at page 1 again. Also deleting the cookie on the search page is not possible because it is in a different path. Is there a way to change the cookies path? (i use 1.8.2)

Alternatively is there a completely different way to achieve the desired behavior also such not including state saving at all?

Replies

  • beginner_beginner_ Posts: 55Questions: 2Answers: 0
    Answer:

    I disabled state-saving and went with using the "unique url AJAX pattern" that uses the # part of the url. This has the advantage that the back button actually goes back to the previous page of datatables.

    Done using this jquery plug-in: http://benalman.com/projects/jquery-bbq-plugin
This discussion has been closed.