Jump to content

Archived

This topic is now archived and is closed to further replies.

radalin

browser back button keep input values

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
you can make a back link and use Javascript:history(back); It will solve your problem.

George

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.