Solved

Data Lost with back button used

Posted on 2013-11-22
3
211 Views
Last Modified: 2013-11-25
I have a page that calls several ajax queries. These queries populate about 30 div's. Included in these divs are links which take people to detail pages. My initial page loads with none of the data in the divs when a user goes to a detail page and then hits the browser back button. How can I resolve this?
0
Comment
Question by:NickMalloy
  • 2
3 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39669897
You have to reload the AJAX queries.  The Back button and usually Refresh just load the original page.
0
 

Author Comment

by:NickMalloy
ID: 39669916
is there a way to tell if the page is a reload or coming from the back button?
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 400 total points
ID: 39670625
No, you need to check whatever method your are using to load the AJAX data to see if it has already been done.  If it has, then it must be a Back button and you need to load it again.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

DOM Attributes and Properties treatment with jQuery 1.6 by Ivo Stoykov jQuery (http://jquery.com/) 1.6 introduces .prop() (http://api.jquery.com/prop/) and .removeProp() (http://api.jquery.com/removeProp/) methods which allow modifying or removi…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question