If you are on the developing path of your first AJAX based program, one of the biggest challenges that you have to face is to let your users remember not to hit the back button. Most of the time, there is a back button problem in AJAX based programs. As a result, you may start to believe that AJAX programs do not like the back button.
Unfortunately, AJAX does not contain the functionality of bookmarking the previous page so that it could be reloaded anytime. With this development or some people call it a disability; it is quite clear that today’s browsers were built without thinking of the possibility that a back might be extinct one day. It also goes to show that AJAX is way bigger than browsers and AJAX will definitely be going out of the browser one day. Before we realize those realities, we have to recognize the fact that there is still a back button. The functionality of browser will not be completed without a back button.
Back button function is a very efficient tool for everyone without which we might finish up doing the same process all over again instead of just clicking on the back button to repeat the procedure. A back button should be implemented even in an AJAX based application.
It may sound like a knotty answer to the problem. But the only hurdle you would face in enabling the back button of your AJAX based application is developing this function for both Mozilla and Internet Explorer web browser. Each of these browsers has their own configuration, so that the back button could be used at any time.
Internet Explorer requires a little different configuration compared to the Mozilla. In this account, it is highly recommended to use Dojo toolkit as they have a library that provides an easy functionality for an AJAX based function. The back button in this toolkit could be easily used. Mainly this library uses a lot of iFrame so that the webpage and state will be specified. Instead of using # for a more specified function, developers target .src and load the webpage with the previous state. It is also required that a querystring be added that practically imitates the # functionality.
In Mozilla, the first step in enabling the back button is to build a PageLocator function. This code will virtually tell the browser where to go. If the webpage is built on different frames, the developer should specify the actual action to perform on previous action of the browser.
However, this code will practically allow you go back to the previous webpage but will nonetheless reload. In a regular web-page such as an HTML based site, you can easily go back to the webpage especially the last state of the page before you left. Page locator will just let you go back and it is just like writing the link again in another browser. To answer this, you have to add another function called setContent. But it does not complete there, you have to add # in the parameters so that you will be accurately at where had to go and save the last state.



english
español
Deutsch
français
Italiano
Português
русский










Deixar uma resposta