Jump to content

Recommended Posts

The other possibility is repopulating the form based on the submitted data in $_POST.

Yes, normally but that wouldn't work if the back button is clicked as stated in the post. This forum uses ajax to save the data in a form so the page is not reloaded, that is why the data persists.

 

A cookie is a dumb idea! You don't store form data in cookies to maintain persistence. If I was logging into my online bank account would it be wise to store my account details in a cookie?

I think it's entirely the browser, and nothing to do with anything server side.

 

If you let your browser cache and save form field data, then it will do it... however, you can use sessions to force it to repopulate if you want.

 

But by hitting 'Back' you don't actually reload the page, so it really doesn't even matter what's changing server-side, as it's not being reloaded... which is why I suggested cookies, which are stored client-side. Obviously you just have to be picky about which forms you want to save.

I think it's entirely the browser, and nothing to do with anything server side.

 

If you let your browser cache and save form field data, then it will do it... however, you can use sessions to force it to repopulate if you want.

 

But by hitting 'Back' you don't actually reload the page, so it really doesn't even matter what's changing server-side, as it's not being reloaded... which is why I suggested cookies, which are stored client-side. Obviously you just have to be picky about which forms you want to save.

 

Best practice would be to use sessions, there are times when sensitive form data should not be kept client-side but rather server-side (cookie grabbers, etc...)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.