Click to See Complete Forum and Search --> : confused post resend
tripwater
10-23-2003, 11:32 AM
most all sites I visit handle the back button and never have to deal with the inconveinence of the resend post data popup warnings.
I have been told to put meta tags (pragma=no-cache) I tried this and it did not seem to work for me.
So are all of those sites setting this meta tag? If so, does this not mean that the browser does not cache ?
How does Amazon.com and sites like that hold all of my user info when I hit the back button without it caching?
I do not get that message on sites like that. I would offer maybe session vars, but that would mean they are setting every POST element = to a session var (or are they using cookies for every element in the form?)so you could view it again and I don't see how that is possible with heavy traffic like Amazon gets. I am really ignorant to this aspect of a website so I apologize. Please clarify if anyone knows the answer.
Thank you for any help.
It reads the data from a database because you are logged in. Also, with a server-side language, you can send the client back a page without the processed data being re-sent, but still have its fields filled in with the data the user inputted originally.
[J]ona
tripwater
10-24-2003, 08:04 AM
Thank you for the reply. I knew you could do that. I am using php and mysql.
The problem is, if this is the first time they have visited the site/page there is no info in the database. I am storing all of the post variables in session variables for the back button to show them because I do not want to submit anything into my database until the final processing has been done. This saves on disk space if the user get half way through the process and cancels or closes their browser.
I don't want my tables holding useless info so I make sure they complete the process first. But by doing this when they hit he back button, their info is still in the form because of my session vars but they get the resend post data popup.
This is what I am trying to avoid. Am I handling this incorrectly? And what options do I have available?
Thanks again
Originally posted by tripwater
I am storing all of the post variables in session variables for the back button to show them because I do not want to submit anything into my database until the final processing has been done.
Isn't that your solution?
[J]ona
tripwater
10-24-2003, 02:16 PM
It works yes, for filling out the form but the user stills gets the resend post data popup when they hit the back button.
BTW the Spiralling - over and over under your handle...is that a Rain City reference (Turin Brakes)?
If it resends the data, it will just overwrite itself, so it will make no difference.
Spiraling, over and over again, is from Seventh Day Slumber (http://seventhdayslumber.com/). A pretty neat mild-rock band. ;)
[J]ona
tripwater
10-24-2003, 02:35 PM
But if I do not want the popup to come up at all would I need to set my server to no cache or use some method of Javascript to suppress this? because it is annoying.
Thanks for your patience.
You can set it so that when they press the backspace key, it will make them go two pages back by using location.replace()...
[J]ona
tripwater
10-24-2003, 02:54 PM
Thanks for your help but that's not what I am looking for.
There has to be a way to keep the resend post data popup from coming up when a user hits the BACK button in their browser. I see Amazon and other sites do it and it still keeps the info in the form when you go back to that page. That is what I want.
This is weird. I have submitted to 2 forums now and found that a few other people were asking the same thing but no one has a text book solution as to how this is accomplished but yet almost all data gathering sites pull this off. I am missing something.
Then perhaps I am not understanding correctly.
[J]ona
tripwater
10-24-2003, 03:26 PM
Thank you for your patience and your time.
I am going to go back and look over my code and see if the places that are bringing this up are in fact all using session variables.
Thanks again.
Glad to be of assistance.
[J]ona