Solved

Data Lost with back button used

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

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 82

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
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)

744 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

15 Experts available now in Live!

Get 1:1 Help Now