Answer the question
In order to leave comments, you need to log in
Loading page fragments using ajax in opera and chrome?
In general, the essence is this: I get some dynamic content on the page via ajax, embed it in the current page, and this dynamic content has various links, if you click on them in chrome or opera, and then go back, then nothing is saved. In mozilla and safari everything is ok, they remember. How can this problem be overcome? I really need to figure it out, please help.
Answer the question
In order to leave comments, you need to log in
Here once mozilla and safari do not work correctly - I think this is due to caching.
You need a browser independent solution, you can't hope that after updating your browser or safari they will behave the same way .
You can insert a link "Go back" with certain parameters with which you will determine what content was downloaded earlier and, when clicked, display it immediately. But here the situation is such that the visitor can press both this button and the "back" button in the browser panel or the "backspace" button and problems will begin.
As an option, in the session, remember which content was loaded and, after visiting the same page, issue it again, but only if there was a transition, as in your case (i.e.: page with dynamic content -> link -> back). To do this, you can store the last 2 visited pages in the session and check for a match.
As for me, this will solve your problem, but I'm sure that there is a more beautiful and correct solution
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question