Solved

Data Lost with back button used

Posted on 2013-11-22
3
219 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
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)

729 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