Solved

Data Lost with back button used

Posted on 2013-11-22
3
208 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I have answered several questions lately that were solved utilizing the power of jQuery's AJAX functions, so I thought I would write an article demonstrating the ease of use. Why should I use jQuery as opposed to regular JavaScript? Now I know…
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…
The viewer will learn how to dynamically set the form action using jQuery.
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)

896 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now