By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,480 Members | 1,808 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,480 IT Pros & Developers. It's quick & easy.

Remember data

P: 46
Hello

I'm building a simple search option so my site and I have a problem with remembering the data. For example if user hits the search button, the data is loaded with ajax and he/she goes to the next link showed in loaded data. Now when he/she hits the return button, it goes back to main state, but I want that it returns to state where the search data is showed....

should I use some tricks, maybe remembering data with cookies or something...
Jul 2 '08 #1
Share this Question
Share on Google+
3 Replies


acoder
Expert Mod 15k+
P: 16,027
Yes, or add history/back button functionality to your Ajax application. See, for example, this link.
Jul 2 '08 #2

P: 46
hm, looks interesting, only problem is that it doesn't work with safari... maybe does now after almost 3 years...

my idea was to use ajax to store data, basically what is users searching, where etc and then this data is reloaded when he/she returns to search page. Only problem is that I don't know how to separate returning to search page and accessing it (it will load last searched data).. any ideas?
Jul 2 '08 #3

acoder
Expert Mod 15k+
P: 16,027
Well, in that case, use cookies. If the cookie is set, reload the search, otherwise keep the default state.
Jul 2 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.