radalin Posted September 7, 2006 Share Posted September 7, 2006 Hi,In some sites after submitting a form, when you click on back button of the browser, you see that your old inputs are kept and can be reused. How is this done? Is this the ability of the browser or some sort of other thing?(Just like this site, in the page where you post a topic, click on back button and then forward button, what you have written in the inputs are not lost.) How can I do this to my site too? Any help or article or tutorial or any helping material is welcome.I'm not sure if that's the right place for this topic. I'm sorry if it's wrong.Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/20017-browser-back-button-keep-input-values/ Share on other sites More sharing options...
ober Posted September 7, 2006 Share Posted September 7, 2006 If the inputs are kept after using the back button, it's because of the caching setup in the browser. There's nothing in PHP that can do that. Most browsers have settings to change this behavior. Quote Link to comment https://forums.phpfreaks.com/topic/20017-browser-back-button-keep-input-values/#findComment-87777 Share on other sites More sharing options...
Gruzin Posted September 7, 2006 Share Posted September 7, 2006 you can make a back link and use Javascript:history(back); It will solve your problem.George Quote Link to comment https://forums.phpfreaks.com/topic/20017-browser-back-button-keep-input-values/#findComment-87782 Share on other sites More sharing options...
ober Posted September 7, 2006 Share Posted September 7, 2006 Again, the reaction of the browser will not always be the same. Using Javascript to go back is the same thing as hitting the back button. Quote Link to comment https://forums.phpfreaks.com/topic/20017-browser-back-button-keep-input-values/#findComment-87793 Share on other sites More sharing options...
stefands Posted October 13, 2006 Share Posted October 13, 2006 This feature interests me. Is it as simple as (?):[code]<a href="javascript:history.back()">back</a>[/code]From what I gather this can cause problems, how is this?Many thx! Quote Link to comment https://forums.phpfreaks.com/topic/20017-browser-back-button-keep-input-values/#findComment-108517 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.