I have a set of data on my home page as a result of Ajax response..clicking on any of the data will guide me to another page .but whenever i click the back button of the browser it guides me to the home page , not showing the ajax data..is there anyway to act ajax data as session or something ???
Asked
Active
Viewed 600 times
2 Answers
1
function callback(hash) {
// do stuff that loads page content based on hash variable
}
$(document).ready(function() {
$.history.init(callback);
$("a[@rel='history']").click(function(){
$.history.load(this.href.replace(/^.*#/, ''));
return false;
});
});
More Solutions:
0
I would say you should make another call when you click back on home page. By storing on a page with jquery, you are compromising with security. See this jQSession. Try to invoke ajax call again since Ajax is fast anyway. All the session data should be handled by a server side script.