473,397 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Clearing the "form submit" cache: how?

Situation: User submits a form, gets a page returned. User clicks
the "reload button."

Normal result: Browser asks to confirm re-submitting of the form
data.

That's not what I want. What I want is behavior like what Wikipedia
does, as well as vBulletin forums and other nice php-based sites:

Situation: User submits a form, gets a page returned. User clicks
the "reload button."

Desired Result: The current page simply re-loads and the user isn't
asked to confirm re-submission of the form data. The form data
isn't re-submitted.

This may not be a php problem, but I tend to notice this on php
sites because my php site doesn't exhibit this behavior, and I want
it to. How do I accomplish this?

-A
Nov 18 '07 #1
17 5630
On Nov 17, 9:56 pm, a...@spamcop.net (axlq) wrote:
Situation: User submits a form, gets a page returned. User clicks
the "reload button."

Normal result: Browser asks to confirm re-submitting of the form
data.

That's not what I want. What I want is behavior like what Wikipedia
does, as well as vBulletin forums and other nice php-based sites:

Situation: User submits a form, gets a page returned. User clicks
the "reload button."

Desired Result: The current page simply re-loads and the user isn't
asked to confirm re-submission of the form data. The form data
isn't re-submitted.

This may not be a php problem, but I tend to notice this on php
sites because my php site doesn't exhibit this behavior, and I want
it to. How do I accomplish this?

-A
This question has been asked and answered many times in this
newsgroup. With a little bit of searching you should be able to find
it.
Nov 18 '07 #2
In article <ae**********************************@e1g2000hsh.g ooglegroups.com>,
ZeldorBlat <ze********@gmail.comwrote:
>On Nov 17, 9:56 pm, a...@spamcop.net (axlq) wrote:
>Desired Result: The current page simply re-loads and the user isn't
asked to confirm re-submission of the form data. The form data
isn't re-submitted.

This question has been asked and answered many times in this newsgroup.
No, not really, as far as I can tell.
>With a little bit of searching you should be able to find it.
Perhaps I am using the wrong terminology in my search. All I find
are articles about form data being lost, not on intentionally losing
it.

-A
Nov 18 '07 #3
On Nov 17, 10:42 pm, a...@spamcop.net (axlq) wrote:
In article <ae57203b-6781-4068-b1b6-9317e3549...@e1g2000hsh.googlegroups.com>,

ZeldorBlat <zeldorb...@gmail.comwrote:
With a little bit of searching you should be able to find it.

Perhaps I am using the wrong terminology in my search. All I find
are articles about form data being lost, not on intentionally losing
it.

-A
Perhaps "form double post" or "form double submission" would work?
Nov 18 '07 #4
In article <3e**********************************@b36g2000hsa. googlegroups.com>,
ZeldorBlat <ze********@gmail.comwrote:
>On Nov 17, 10:42 pm, a...@spamcop.net (axlq) wrote:
>In article <ae57203b-6781-4068-b1b6-9317e3549...@e1g2000hsh.googlegroups.com>,

ZeldorBlat <zeldorb...@gmail.comwrote:
>With a little bit of searching you should be able to find it.

Perhaps I am using the wrong terminology in my search. All I find
are articles about form data being lost, not on intentionally losing
it.

Perhaps "form double post" or "form double submission" would work?
Ah. Yes, thanks.

MY searches only turned up non-useful information (and eventually my
original posting). For searches by others in the future:

Apparently the trick is to separate the form processing URL from the
output URL. That is, have the form on page1.php execute page2.php,
which does processing but no output, and then use header("Location:
page3.php") to redirect to the result page that actually does
output. Then, refreshing page3.php will simply refresh the page
without re-submitting the form on page1.php.

-A
Nov 18 '07 #5
get
In article <3e8391a8-b8f6-4e92-a6c6-
ab**********@b36g2000hsa.googlegroups.com>, ze********@gmail.com says...
On Nov 17, 10:42 pm, a...@spamcop.net (axlq) wrote:
In article <ae57203b-6781-4068-b1b6-9317e3549...@e1g2000hsh.googlegroups.com>,

ZeldorBlat <zeldorb...@gmail.comwrote:
>With a little bit of searching you should be able to find it.
-A

Perhaps "form double post" or "form double submission" would work?
perhaps if you just answered the damned question instead of being an arse
it would save us all some time.
Nov 18 '07 #6
..oO(axlq)
>Apparently the trick is to separate the form processing URL from the
output URL.
No, it can all be done on a single page. After the form processing send
a Location header with the absolute URL of the current page back to the
browser - that's it. The following GET request will replace the previous
POST in the browser history, so a reload won't re-submit the form data.

Micha
Nov 18 '07 #7
ge*@alife.com wrote:
In article <3e8391a8-b8f6-4e92-a6c6-
ab**********@b36g2000hsa.googlegroups.com>, ze********@gmail.com says...
>On Nov 17, 10:42 pm, a...@spamcop.net (axlq) wrote:
>>In article <ae57203b-6781-4068-b1b6-9317e3549...@e1g2000hsh.googlegroups.com>,

ZeldorBlat <zeldorb...@gmail.comwrote:

With a little bit of searching you should be able to find it.
>>-A
Perhaps "form double post" or "form double submission" would work?

perhaps if you just answered the damned question instead of being an arse
it would save us all some time.
And maybe he gets tired of answering the same question because you and
others like you are too lazy to search for the answer. Even typing an
asinine post like yours takes more time than searching for the correct
answer.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Nov 18 '07 #8
axlq:
Situation: User submits a form, gets a page returned. User clicks
the "reload button."

Desired Result: The current page simply re-loads and the user isn't
asked to confirm re-submission of the form data. The form data
isn't re-submitted.
Without a URL I can't tell, but I have a suspicion you are using the
POST method instead of the GET method. User-agents should make their
users aware if their actions are non-idempotent.

http://www.w3.org/2001/tag/doc/whenToUseGet.html

--
Jock
Nov 18 '07 #9
In article <xd******************************@comcast.com>,
Jerry Stuckle <js*******@attglobal.netwrote:
>perhaps if you just answered the damned question instead of being an arse
it would save us all some time.

And maybe he gets tired of answering the same question because you and
others like you are too lazy to search for the answer. Even typing an
asinine post like yours takes more time than searching for the correct
answer.
I've been on usenet over 20 years. I know enough to search for
an answer before I post, and I also know to expect a few arrogant
replies from the less experienced usenetters who think they have
answered all the questions already. The only reason I posted the
question in the first place was, OBVIOUSLY, that I didn't find
the answer in spite of my searches. The reason was that I wasn't
searching for the proper terms.

-A
Nov 20 '07 #10
In article <49**********************************@i37g2000hsd. googlegroups.com>,
John Dunlop <jo**@dunlop.namewrote:
>axlq:
>Situation: User submits a form, gets a page returned. User clicks
the "reload button."

Desired Result: The current page simply re-loads and the user isn't
asked to confirm re-submission of the form data. The form data
isn't re-submitted.

Without a URL I can't tell, but I have a suspicion you are using the
POST method instead of the GET method. User-agents should make their
users aware if their actions are non-idempotent.

http://www.w3.org/2001/tag/doc/whenToUseGet.html
Well, yes. The words "resubmission of *form* data" should have made
it clear that I'm referring to POST, not GET.

Anyway, the rest of this thread contains the answer I was looking for.
Thanks.

-A
Nov 20 '07 #11
axlq wrote:
In article <xd******************************@comcast.com>,
Jerry Stuckle <js*******@attglobal.netwrote:
>>perhaps if you just answered the damned question instead of being an arse
it would save us all some time.
And maybe he gets tired of answering the same question because you and
others like you are too lazy to search for the answer. Even typing an
asinine post like yours takes more time than searching for the correct
answer.

I've been on usenet over 20 years. I know enough to search for
an answer before I post, and I also know to expect a few arrogant
replies from the less experienced usenetters who think they have
answered all the questions already. The only reason I posted the
question in the first place was, OBVIOUSLY, that I didn't find
the answer in spite of my searches. The reason was that I wasn't
searching for the proper terms.

-A
If you've been on usenet over 20 years as you claim, then you should
have been able to figure out the search words to use.

I've been on a lot longer than you - stretching back to the arpanet days
in the early 70's. And I know there are always a few arrogant
usenetters who think that since they've been on for X number of years
they don't need to do their own homework.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Nov 20 '07 #12
axlq:
The words "resubmission of *form* data" should have made
it clear that I'm referring to POST, not GET.
Which part of "resubmission of form data" do you think excludes GET?

--
Jock
Nov 20 '07 #13
In article <1N******************************@comcast.com>,
Jerry Stuckle <js*******@attglobal.netwrote:
>If you've been on usenet over 20 years as you claim, then you should
have been able to figure out the search words to use.
Ah, but I haven't been doing php that long, or WWW programming, so I'm
not up on the jargon. If you don't know the search terms, your search
is bound to fail.
>I've been on a lot longer than you - stretching back to the arpanet days
in the early 70's.
I personally doubt that, but I'll grant it.
>And I know there are always a few arrogant
usenetters who think that since they've been on for X number of years
they don't need to do their own homework.
Thank heavens I'm not one of them.

-A
Nov 21 '07 #14
In article <12**********************************@b36g2000hsa. googlegroups.com>,
John Dunlop <jo**@dunlop.namewrote:
>axlq:
>The words "resubmission of *form* data" should have made
it clear that I'm referring to POST, not GET.

Which part of "resubmission of form data" do you think excludes GET?
Eh... you're right. I got so into the habit of forms using the POST
method that I forgot you could use GET as well.
-A
Nov 21 '07 #15
axlq wrote:
In article <1N******************************@comcast.com>,
Jerry Stuckle <js*******@attglobal.netwrote:
>If you've been on usenet over 20 years as you claim, then you should
have been able to figure out the search words to use.

Ah, but I haven't been doing php that long, or WWW programming, so I'm
not up on the jargon. If you don't know the search terms, your search
is bound to fail.
>I've been on a lot longer than you - stretching back to the arpanet days
in the early 70's.

I personally doubt that, but I'll grant it.
I'm older than you think. I've been programming for about 40 years now.
And back in the 70's arpanet was mainly the military and those
associated with the military - i.e. companies and universities doing
military research.
>And I know there are always a few arrogant
usenetters who think that since they've been on for X number of years
they don't need to do their own homework.

Thank heavens I'm not one of them.

-A


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Nov 21 '07 #16
axlq:
I got so into the habit of forms using the POST
method that I forgot you could use GET as well.
If your action does not change a resource (e.g., a database query),
GET would generally be more appropriate.

http://www.w3.org/2001/tag/doc/whenToUseGet.html

--
Jock
Nov 21 '07 #17
In article <b0**********************************@l22g2000hsc. googlegroups.com>,
John Dunlop <jo**@dunlop.namewrote:
>axlq:
>I got so into the habit of forms using the POST
method that I forgot you could use GET as well.

If your action does not change a resource (e.g., a database query),
GET would generally be more appropriate.

http://www.w3.org/2001/tag/doc/whenToUseGet.html
Thanks. All but one of the form submit actions change a resource on
my site. The one that doesn't has so many variables in it that a
GET string is too unwieldy, so I use POST for that too.

-A
Nov 22 '07 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: lsarg | last post by:
i've been trying forever to figure out a way to use a regular text link in place of a submit button at the bottom of this. can't get it. i'm just starting to learn php, so i'm stuck. any help at...
1
by: David Bradbury | last post by:
Hi On my form, as soon as the user clicks my submit button a message pops up saying "Form processing" as the form submits. This is fine as long as the user only clicks the submit button once....
3
by: Hodad | last post by:
I would like to adapt, as much as possible, the appearance and color red of the font in this button: <P><CENTER><BUTTON VALUE="SUBMIT"><A...
5
by: Werner Partner | last post by:
On my testpage http://www.sonoptikon.de/test.php I have this <table><tr> <td valign="top" align="center" style="width:150px;"> <form action=test.php method="get">
2
by: martyn_wynne | last post by:
Hi, I have found a odd one, my submit button is not submitting on a method="get" form after using any form of DataBind? Has anyone struck this problem before? here is snipits of the code as...
6
by: Chris | last post by:
In asp we have "Response.Expires = 0" and I've tried: HttpResponse.RemoveOutputCacheItem("page location") But I can't get the page to display new. This is a problem if the data is changed and the...
4
by: dschruth | last post by:
Hello. Can anybody solve this problem? I am using a server-side language (PERL) to *try* to POST data to a HTTPS login script that doesn't have a standard "submit" button. The form appears...
2
by: Ron | last post by:
I'm trying to check the value of a checkbox and respond accordingly. I had one checkbox working then I changed the name and value and it stopped working. I've checked very carefully to make sure...
14
by: white lightning | last post by:
How to have <select onchange="this.form.submit()"and also a Submit button on one form? I have something like this: <form action="<?php $_SERVER; ?>" method="post"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.